Why can't I set_model_state for the erratic robot?
When I use rosservice call /gazebo/setmodelstate for erratic robots in gazebo, they will move to that position if the simulation is paused, but once it is started they snap back to their original position. This service call works with other robots (i.e. clearpath husky, guardian robotnik). I have also tried changing the environment variable ROBOTINITIALPOSE and editing the launch files to have the robots spawn in different places. Here is the launch file I have been using specifically:
<group ns="robot1">
<param name="tf_prefix" value="robot1"/>
<!-- send the erratic robot XML to param server -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find erratic_description)/urdf/erratic_laser.urdf.xacro'" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_robot1" pkg="gazebo" type="spawn_model"
args="-param robot_description
-urdf
-x 0.5
-y -0.5
-z 0.03
-model robot1"
respawn="false" output="screen" />
<!-- start robot state publisher -->
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher1" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
</group>
<group ns="robot2">
<param name="tf_prefix" value="robot2"/>
<!-- send the erratic robot XML to param server -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find erratic_description)/urdf/erratic.urdf.xacro'" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_robot2" pkg="gazebo" type="spawn_model"
args="-param robot_description
-urdf
-x -0.5
-y -0.5
-z 0.03
-model robot2"
respawn="false" output="screen" />
<!-- start robot state publisher -->
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher2" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
</group>
Here is the output of the terminal running Gazebo after roslaunch erraticdescription twoerraticmobilebases.launch is ran in another terminal:
Dbg plugin parent sensor name: robot2
[ INFO] [1360186157.511868993, 957.360000000]: starting diffdrive plugin in ns: /robot2//
[ INFO] [1360186157.518006227, 957.360000000]: p3d plugin missing !pos.isNaN() && "Invalid vector supplied as parameter"' failed.
/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui: line 2: 9615 Aborted (core dumped)
rospack find gazebo/gazebo/bin/gzclient -g
rospack find gazebo`/lib/libgazeborospathsplugin.so
[gazebogui-2] process has died [pid 9612, exit code 134, cmd /opt/ros/fuerte/stacks/simulatorgazebo/gazebo/scripts/gui _name:=gazebogui _log:=/home/alan/.ros/log/1ded700e-70a4-11e2-8a9e-00264d8b9feb/gazebogui-2.log].
log file: /home/alan/.ros/log/1ded700e-70a4-11e2-8a9e-00264d8b9feb/gazebogui-2*.log
I am using ROS Fuerte, Gazebo version 1.0.2, and Ubuntu 12.04 (Precise). Thanks for your help!
Asked by ajhamlet on 2013-02-05 11:35:27 UTC
Comments