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

libgazebo_ros_planar_move.so doesn't behave as expected

asked 2021-03-07 08:10:36 -0500

amoo29 gravatar image

Hello!

I'm trying to control a Robot in Gazebo with Simulink. I'm using the libgazebo_ros_planar_move.so controller but when I enter a value for the angular velocity, the robot doesn't behave as expected. With a linear velocity of x,y,z = 0 and an angular velocity around z = 2*PI, the robot should turn once every second because 2*PI rad/s --> 360°/s. But the Robot is turning once every ~8 seconds.

In my xacro file I have the following for my controller:

<gazebo>
  <plugin name="object_controller" filename="libgazebo_ros_planar_move.so">
    <commandTopic>cmd_vel</commandTopic>
    <odometryTopic>odom</odometryTopic>
    <odometryFrame>odom</odometryFrame>
    <odometryRate>30.0</odometryRate>
    <robotBaseFrame>chassis</robotBaseFrame>
  </plugin>
</gazebo>

And for the body:

    <!-- CHASSIS -->
  <link name='chassis'>
    <pose>0 0 0 0 0 0</pose>

    <inertial>
      <mass value="${mass_chassis}"/>
      <origin xyz="0.0 0 0.0" rpy=" 0 0 0"/>
        <xacro:box_inertia m="${mass_chassis}" w="0.46" h="0.15" d="0.05" />
    </inertial>

    <collision name='chassis_collision'>
      <geometry>
        <box size=".46 .15 .05"/>
      </geometry>
    </collision>

    <visual name='chassis_visual'>
      <origin xyz="0 0 0" rpy=" 0 0 0"/>
      <geometry>
        <box size=".46 .15 .05"/>
      </geometry>
    </visual>
  </link>

Also, there are four wheels with zero friction.

Does anybody know what I have to change to make the robot move es expected?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-03-07 08:53:39 -0500

amoo29 gravatar image

After I read my own question again I realized that all the components of the robot have masses. I don't need these because all my physics (vehicle dynamics) are made by Matlab/Simulink. So I fixed my issue by setting the masses of all four tires, the chassis and camera to zero. Also, I had to change my joint type from continuous to fixed, which didn't matter for me because Matlab.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-03-07 08:10:36 -0500

Seen: 802 times

Last updated: Mar 07 '21