Good afternoon to everyone. I have the following problem:
I’m running a simulation with one turtlebot that is able to move simple objects in a rectangular arena. Both the arena and the objects are defined in sdf format.
This is the code for the objects:
<?xml version="1.0" ?>
<sdf version="1.9">
<model name ="object">
<link name="link_object">
<visual name="visual_object">
<geometry>
<cylinder>
<radius>.1</radius>
<length>0.08</length>
</cylinder>
</geometry>
<material>
<diffuse>1 1 0 1</diffuse>
</material>
</visual>
<collision name="collision_object">
<geometry>
<cylinder>
<radius>.1</radius>
<length>0.08</length>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>0.05</mu>
</ode>
</friction>
</surface>
</collision>
</link>
</model>
</sdf>`
And this is the code to build the arena:
<?xml version="1.0" ?>
<sdf version="1.9">
<world name="arena">
<scene>
<ambient>1 1 1 1</ambient>
<grid>0</grid>
</scene>
<physics type="ode">
<max_step_size>0.003</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
<gazebo>
<plugin file_name="libignition-gazebo-contact-system.so" name="ignition::gazebo::systems::Contact"/>
</gazebo>
<gazebo>
<plugin file_name="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre</render_engine>
</plugin>
</gazebo>
<plugin name='ignition::gazebo::systems::Physics' filename='libignition-gazebo-physics-system.so'/>
<plugin name='ignition::gazebo::systems::UserCommands' filename='libignition-gazebo-user-commands-system.so'/>
<plugin name='ignition::gazebo::systems::SceneBroadcaster' filename='libignition-gazebo-scene-broadcaster-system.so'/>
<plugin filename="libignition-gazebo-contact-system.so" name="ignition::gazebo::systems::Contact"></plugin>
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre</render_engine>
</plugin>
<light type="point" name="point_light1">
<intensity>1</intensity>
<pose>0 -0.6 1.5 0 0 0</pose>
<diffuse>1 1 0 1</diffuse>
<specular>.1 .1 .1 1</specular>
<attenuation>
<range>4</range>
<linear>1</linear>
<constant>0.8</constant>
<quadratic>0</quadratic>
</attenuation>
<cast_shadows>false</cast_shadows>
</light>
<light type="point" name="point_light2">
<intensity>1</intensity>
<pose>1.5 -0.6 1.5 0 0 0</pose>
<diffuse>1 1 0 1</diffuse>
<specular>.1 .1 .1 1</specular>
<attenuation>
<range>4</range>
<linear>1</linear>
<constant>0.8</constant>
<quadratic>0</quadratic>
</attenuation>
<cast_shadows>false</cast_shadows>
</light>
<light type="point" name="point_light3">
<intensity>1</intensity>
<pose>-1.5 -0.6 1.5 0 0 0</pose>
<diffuse>1 1 0 1</diffuse>
<specular>.1 .1 .1 1</specular>
<attenuation>
<range>4</range>
<linear>1</linear>
<constant>0.8</constant>
<quadratic>0</quadratic>
</attenuation>
<cast_shadows>false</cast_shadows>
</light>
<include>
<uri>ground.sdf</uri>
</include>
<include>
<uri>walls.sdf</uri>
</include>
<model name="objects">
<!-- include objects-->
<include>
<uri>object.sdf</uri>
<name>object1</name>
<pose>0.4 0.1 1 0 0 0</pose>
</include>
<include>
<uri>object.sdf</uri>
<name>object2</name>
<pose>-0.4 0.8 1 0 0 0</pose>
</include>
<include>
<uri>object.sdf</uri>
<name>object3</name>
<pose>1.3 0.8 1 0 0 0</pose>
</include>
<include>
<uri>object.sdf</uri>
<name>object4</name>
<pose>-1.3 0.8 1 0 0 0</pose>
</include>
<plugin filename="libignition-gazebo-pose-publisher-system" name="ignition::gazebo::systems::PosePublisher">
<publish_link_pose>false</publish_link_pose>
<publish_model_pose>false</publish_model_pose>
<publish_nested_model_pose>false</publish_nested_model_pose>
<use_pose_vector_msg>true</use_pose_vector_msg>
</plugin>
</model>
</world>
The problem that I’m facing is that when I try to push an object with the turtlbot the pose on the corresponding topic is updated with the right value only for the objects 2,3,4. If I move the object 1 the values of all the other objects are being updated, except the pose for the object 1.
I think there must be a problem on the PosePublisher plugin but I don’t understand what I’m doing wrong.
Thanks in advance for your help.