Skip to content

Commit 048a4cd

Browse files
committed
support to pass ROBOT_INITIAL_POSE via argument, in addition to environment
1 parent 7ac1422 commit 048a4cd

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

pr2_gazebo/launch/pr2.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<launch>
22
<arg name="KINECT1" default="$(optenv KINECT1 false)" />
33
<arg name="KINECT2" default="$(optenv KINECT2 false)" />
4+
<arg name="ROBOT_INITIAL_POSE" default="$(optenv ROBOT_INITIAL_POSE)" />
45

56
<!-- Startup PR2 without any mechanism controllers -->
6-
<include file="$(find pr2_gazebo)/launch/pr2_no_controllers.launch" pass_all_args="true"/>
7+
<include file="$(find obinata_pr2_73b2_cleanup)/launch/pr2_no_controllers.launch" pass_all_args="true"/>
78

89
<!-- Load and Start Default Controllers -->
910
<include file="$(find pr2_controller_configuration_gazebo)/launch/pr2_default_controllers.launch" />
1011

1112
</launch>
12-

pr2_gazebo/launch/pr2_empty_world.launch

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<arg name="KINECT1" default="$(optenv KINECT1 false)" />
1414
<arg name="KINECT2" default="$(optenv KINECT2 false)" />
15+
<arg name="ROBOT_INITIAL_POSE" default="$(optenv ROBOT_INITIAL_POSE)" />
1516

1617
<include file="$(find gazebo_ros)/launch/empty_world.launch">
1718
<arg name="gui" value="$(arg gui)" />
@@ -26,9 +27,10 @@
2627
</include>
2728

2829
<!-- start pr2 robot -->
29-
<include file="$(find pr2_gazebo)/launch/pr2.launch">
30+
<include file="$(find obinata_pr2_73b2_cleanup)/launch/pr2.launch">
3031
<arg name="KINECT1" value="$(arg KINECT1)" />
3132
<arg name="KINECT2" value="$(arg KINECT2)" />
33+
<arg name="ROBOT_INITIAL_POSE" value="$(arg ROBOT_INITIAL_POSE)" />
3234
</include>
3335

3436
</launch>

pr2_gazebo/launch/pr2_no_controllers.launch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<launch>
22
<arg name="KINECT1" default="$(optenv KINECT1 false)" />
33
<arg name="KINECT2" default="$(optenv KINECT2 false)" />
4+
<arg name="ROBOT_INITIAL_POSE" default="$(optenv ROBOT_INITIAL_POSE)" />
45

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

89
<!-- push robot_description to factory and spawn robot in gazebo -->
9-
<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" />
10+
<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" />
1011

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

0 commit comments

Comments
 (0)