ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

By wobble/bounce, do you mean a small movement at the robot's start position? If that is the case, it is probably because the offset is too low, and the wheel of the robot rubs against the ground_plane of the world, causing the weight shift.

Node(      
    package='gazebo_ros', executable='spawn_entity.py',
    arguments=[
      '-topic', 'robot_description',
      '-entity', 'm2wr',
      '-x', '0',
      '-y', '0',
      '-z', '0.0' # No offset
    ],
    output='screen'
),

There is indeed a small bounce/wobble when you try calling the service. This is because the offset is too low, and the wheel of the robot rubs against the ground_plane of the world, causing the weight shift.

To combat this, you could spawn the robot at a small offset from the origin (say 5cm):

Node(
    package='gazebo_ros', executable='spawn_entity.py',
    arguments=[
      '-topic', 'robot_description',
      '-entity', 'm2wr',
      '-x', '0',
      '-y', '0',
      '-z', '0.05' # Minimal offset
    ],
    output='screen'
),

As indicated above, spawning at a minimal offset removes all bounce.

Note

  • If you want to reset only the robot without resetting all the poses of the models in the simulation, you can use the /set_entity_state service after adding the following block to your world file:

    Snippet to be added to your world:

    <plugin name="gazebo_ros_state" filename="libgazebo_ros_state.so">
      <ros>
        <namespace>/</namespace>
        <remapping>model_states:=model_states_demo</remapping>
        <remapping>link_states:=link_states_demo</remapping>
      </ros>
      <update_rate>50.0</update_rate>
    </plugin>
    

    ROS2 Service Call:

    ros2 service call /set_entity_state gazebo_msgs/SetEntityState "state: {name: m2wr, pose: {position: {x: 0.0, y: 0.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}, reference_frame: world}"
    


By wobble/bounce, do you mean a small movement at the robot's start position? If that is the case, it is probably because the offset is from ground maybe too low, and the wheel of the robot rubs against the ground_plane of the world, causing the weight shift.

Node(      
    package='gazebo_ros', executable='spawn_entity.py',
    arguments=[
      '-topic', 'robot_description',
      '-entity', 'm2wr',
      '-x', '0',
      '-y', '0',
      '-z', '0.0' # No offset
    ],
    output='screen'
),

There is indeed a small bounce/wobble when you try calling the service. This is because the offset is too low, and the wheel of the robot rubs against the ground_plane of the world, causing the weight shift.
service with no offset

To combat this, you could spawn the robot at a small offset from the origin (say 5cm):

Node(
    package='gazebo_ros', executable='spawn_entity.py',
    arguments=[
      '-topic', 'robot_description',
      '-entity', 'm2wr',
      '-x', '0',
      '-y', '0',
      '-z', '0.05' # Minimal offset
    ],
    output='screen'
),

As indicated above, spawning at a minimal offset removes all bounce.

Note

  • If you want to reset only the robot without resetting all the poses of the models in the simulation, you can use the /set_entity_state service after adding the following block to your world file:

    Snippet to be added to your world:

    <plugin name="gazebo_ros_state" filename="libgazebo_ros_state.so">
      <ros>
        <namespace>/</namespace>
        <remapping>model_states:=model_states_demo</remapping>
        <remapping>link_states:=link_states_demo</remapping>
      </ros>
      <update_rate>50.0</update_rate>
    </plugin>
    

    ROS2 Service Call:

    ros2 service call /set_entity_state gazebo_msgs/SetEntityState "state: {name: m2wr, pose: {position: {x: 0.0, y: 0.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}, reference_frame: world}"