-
Notifications
You must be signed in to change notification settings - Fork 939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added gazebo launch file #936
Conversation
Before we merge this can you create a new tutorial that explains how to launch this new file, complete with screenshots of the Franka Emika robot? |
<!-- push robot_description to factory and spawn robot in gazebo --> | ||
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" /> | ||
|
||
<include file="$(find [GENERATED_PACKAGE_NAME])/launch/ros_controllers.launch"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the ros_controllers.launch file supposed to be generated automatically as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, ros_controllers.launch can now be generated automatically by the setup assistant.
Yes, ros_controllers.launch is generated automatically by he setup
assistant.
…On Fri, 8 Jun 2018, 16:46 Jorge Nicho, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
moveit_setup_assistant/templates/moveit_config_pkg_template/launch/gazebo.launch
<#936 (comment)>:
> + <!-- startup simulated world -->
+ <include file="$(find gazebo_ros)/launch/empty_world.launch">
+ <arg name="world_name" default="worlds/empty.world"/>
+ <arg name="paused" value="$(arg paused)"/>
+ <arg name="gui" value="$(arg gui)"/>
+ </include>
+
+ <!-- send robot urdf to param server -->
+ <param unless="$(arg limited)" name="robot_description" [URDF_LOAD_ATTRIBUTE] />
+
+ <param if="$(arg limited)" name="robot_description" [URDF_LOAD_ATTRIBUTE] />
+
+ <!-- push robot_description to factory and spawn robot in gazebo -->
+ <node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" />
+
+ <include file="$(find [GENERATED_PACKAGE_NAME])/launch/ros_controllers.launch"/>
Is the *ros_controllers.launch* file supposed to be generated
automatically as well?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#936 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJyVj1DLwWHDgm-cnKV3l2vhWf_uqk5Gks5t6o49gaJpZM4UYAex>
.
|
Okay, sure.
…On Fri, 8 Jun 2018, 02:53 Dave Coleman, ***@***.***> wrote:
Before we merge this can you create a new tutorial that explains how to
launch this new file, complete with screenshots of the Franka Emika robot?
https://github.com/ros-planning/moveit_tutorials/
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#936 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJyVjy6VPfW9OnqjHc9TI8NAQT68ftlYks5t6csOgaJpZM4UYAex>
.
|
file.file_name_ = "gazebo.launch"; | ||
file.rel_path_ = config_data_->appendPaths(launch_path, file.file_name_); | ||
template_path = config_data_->appendPaths(template_launch_path, "gazebo.launch"); | ||
file.description_ = "gazebo launch file"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please capitalize this description and explain in a sentence what it does, see the other examples in this file.
Also apply the same change to the ros_controllers.launch you added
@@ -0,0 +1,24 @@ | |||
<?xml version="1.0"?> | |||
<launch> | |||
<arg name="limited" default="false"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here about what limited does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds a lot like the limited
arg that some of the universal_robot
launch files have/use.
I don't believe it should be part of a template file introduced by this contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did remove it as @gavanderhoorn suggestion makes sense.
<!-- send robot urdf to param server --> | ||
<param unless="$(arg limited)" name="robot_description" [URDF_LOAD_ATTRIBUTE] /> | ||
|
||
<param if="$(arg limited)" name="robot_description" [URDF_LOAD_ATTRIBUTE] /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two lines do the exact same thing, so the limited variable should be removed or the URDF_LOAD_ATTRIBUTE should change for some reason
<param if="$(arg limited)" name="robot_description" [URDF_LOAD_ATTRIBUTE] /> | ||
|
||
<!-- push robot_description to factory and spawn robot in gazebo --> | ||
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please break this line into two (line too long - max is 120)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, will fix the changes.
Btw I got to get franka to be spawned in gazebo, but I had to do some changes to the urdf file first. What would you recommend, do we make the changes that makes a urdf model gazebo combitable a part of this PR? Or do we better make it a separate one and make this one just for the launch file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move this discussion to the main issue or the gdoc, it does not belong inline with a PR code review :-)
@davetcoleman Btw I got to get franka to be spawned in gazebo, but I had to do some changes to the urdf file first. What would you recommend, do we make the changes that makes a urdf model gazebo combitable a part of this PR? Or do we better make it a separate one and make this one just for the launch file? |
As @davetcoleman and @gavanderhoorn suggested,
|
<param name="robot_description" [URDF_LOAD_ATTRIBUTE] /> | ||
|
||
<!-- push robot_description to factory and spawn robot in gazebo --> | ||
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you understand why -z 0.1
is used?
i believe this may be a custom value for a particular robot that is not very generic. please add a comment in this launch file explaining the purpose of z
(changing the start location of the robot). i think it should default to 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is right, 0 as default makes better sense, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it, now robot spawn at the origin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually can you leave the -z
option there but set it to zero and document its usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we leave the z
, shouldnt we also leave the -x and -y?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great idea!
@mlautman please review |
Cherry-picked to melodic |
Description
Added a gazebo launch file template for the setup assistant.
For the ur10 robot it looks like that.
Checklist