Ask Your Question
0 doesn't behave as expected

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

amoo29 gravatar image


I'm trying to control a Robot in Gazebo with Simulink. I'm using the 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:

  <plugin name="object_controller" filename="">

And for the body:

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

      <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" />

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

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

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

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 148 times

Last updated: Mar 07