Skip to content

Commit

Permalink
support to pass ROBOT_INITIAL_POSE via argument, in addition to envir…
Browse files Browse the repository at this point in the history
…onment
  • Loading branch information
k-okada committed May 22, 2020
1 parent 7ac1422 commit 557b61d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pr2_gazebo/launch/pr2.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<launch>
<arg name="KINECT1" default="$(optenv KINECT1 false)" />
<arg name="KINECT2" default="$(optenv KINECT2 false)" />
<arg name="ROBOT_INITIAL_POSE" default="$(optenv ROBOT_INITIAL_POSE)" />

<!-- Startup PR2 without any mechanism controllers -->
<include file="$(find pr2_gazebo)/launch/pr2_no_controllers.launch" pass_all_args="true"/>
Expand Down
2 changes: 2 additions & 0 deletions pr2_gazebo/launch/pr2_empty_world.launch
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<arg name="KINECT1" default="$(optenv KINECT1 false)" />
<arg name="KINECT2" default="$(optenv KINECT2 false)" />
<arg name="ROBOT_INITIAL_POSE" default="$(optenv ROBOT_INITIAL_POSE)" />

<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="gui" value="$(arg gui)" />
Expand All @@ -29,6 +30,7 @@
<include file="$(find pr2_gazebo)/launch/pr2.launch">
<arg name="KINECT1" value="$(arg KINECT1)" />
<arg name="KINECT2" value="$(arg KINECT2)" />
<arg name="ROBOT_INITIAL_POSE" value="$(arg ROBOT_INITIAL_POSE)" />
</include>

</launch>
Expand Down
3 changes: 2 additions & 1 deletion pr2_gazebo/launch/pr2_no_controllers.launch
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<launch>
<arg name="KINECT1" default="$(optenv KINECT1 false)" />
<arg name="KINECT2" default="$(optenv KINECT2 false)" />
<arg name="ROBOT_INITIAL_POSE" default="$(optenv ROBOT_INITIAL_POSE)" />

<!-- send pr2 urdf to param server -->
<include file="$(find pr2_description)/robots/upload_pr2.launch" pass_all_args="true" />

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_pr2_model" pkg="gazebo_ros" type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model pr2" respawn="false" output="screen" />
<node name="spawn_pr2_model" pkg="gazebo_ros" type="spawn_model" args="$(arg ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model pr2" respawn="false" output="screen" />

<!-- default bringup script -->
<include file="$(find pr2_gazebo)/launch/pr2_bringup.launch" />
Expand Down

0 comments on commit 557b61d

Please sign in to comment.