urdf_spawner -J option not working as intended
Hi all,
I want to set the initial joint positions of a robot in gazebo simulator starting with paused physics. I used the following in the launch file.
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model ps -param robot_description -J joint1 1.5 -J joint2 0.75 -J joint3 -0.5"/>
also I tried,
<node pkg="rosservice" type="rosservice" name="resetter"
args="call --wait /gazebo/set_model_configuration '{model_name: ps, urdf_param_name: robot_description, joint_names: [joint1, joint2, joint3], joint_positions: [1.5, 0.75, -0.5]}'" />
without the -J option in urdf_spawner. Neither seems to work. Currently I have not implemented any controllers for the joints. Therefore, disabling controllers as in this need not be considered for the time being. I could see the following messages but still the joint angles have not changed.
[INFO] [WallTime: 1397641007.444278] [0.000000] Waiting for service /gazebo/set_model_configuration
[INFO] [WallTime: 1397641007.445439] [0.000000] Calling service /gazebo/set_model_configuration
[INFO] [WallTime: 1397641007.446698] [0.000000] Set model configuration status: SetModelConfiguration: success
The only way I could get it to work is by calling:
rosservice call /gazebo/set_model_configuration '{model_name: ps, urdf_param_name: robot_description, joint_names: [joint1, joint2, joint3], joint_positions: [1.5, 0.75, -0.5]}'
separately before I unpause physics.
I use ROS-Hydro with Gazebo 1.9
Any help would be really appreciated. Thanks