a2s-institute / youbot_simulation

Packages to run the KUKA youBot in the Gazebo simulation with ROS
23 stars 42 forks source link

youBot is not attracted by gravity #3

Closed rastaxe closed 8 years ago

rastaxe commented 10 years ago

I have a problem with the simulated youbot. If I move the robot against an object, it happens that the robot raises up on two wheels. Then it never goes down on the ground, it continues to move on two wheels, so it seems that it is not attracted by gravity. Do you have the same behavior?

frederikhegger commented 10 years ago

We observed the same issue. In our opinion is because the planar move plugin is used (last lines of this file: https://github.com/mas-group/youbot_description/blob/hydro-devel/urdf/youbot_base/base.gazebo.xacro) in order to move the robot.

rastaxe commented 10 years ago

I see. So, is there no gazebo plugin for omnidirectional drive? The pr2 base.gazebo.xacro file uses the P3D plugin:

<gazebo>
      <plugin name="p3d_base_controller" filename="libgazebo_ros_p3d.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>100.0</updateRate>
        <bodyName>${name}_link</bodyName>
        <topicName>${name}_pose_ground_truth</topicName>
        <gaussianNoise>0.01</gaussianNoise>
        <frameName>map</frameName>
        <xyzOffsets>0 0 0</xyzOffsets>
        <rpyOffsets>0 0 0</rpyOffsets>
      </plugin>
    </gazebo>

Do you think it is possible to use for the youBot? I tried but I am not an expert so I was not able to make it work.

frederikhegger commented 10 years ago

This plugin only publishes the pose of the robot as Odometry message (see http://gazebosim.org/wiki/Tutorials/1.9/ROS_Motor_and_Sensor_Plugins#P3D_.283D_Position_Interface_for_Ground_Truth.29).

Maybe the controller of the Care-O-bot 3 can be adapted to the youBot: https://github.com/ipa320/cob_driver/tree/hydro_dev/cob_undercarriage_ctrl

rastaxe commented 10 years ago

Is there a way to tell Gazebo to repositioning the youbot at run time (with a script or something)? Because when this problem appears and the robot face a little bit down, the laser sees the ground and the navigation does not work properly. Resetting the position of the model in gazebo will avoid to restart everything.

frederikhegger commented 10 years ago

I do not no if there is something only for the robot, but you can reset the whole world either in the GUI (gzclient) under "Edit -> Reset World", by pressing STRG + R in the GUI or using the rosservice:

rosservice call /gazebo/reset_world

rastaxe commented 10 years ago

No, with the Reset World or Reset Model it does not work, because the orientation of the model remains the same. The only way is to publish the desired orientation of the robot on the /gazebo/set_model_state topic and it works.

frederikhegger commented 10 years ago

Perfect. This I did not know. Thanks

frederikhegger commented 8 years ago

We replaced the move_planar plugin (used as "base controller") with the steered_wheel_base_controller (http://wiki.ros.org/steered_wheel_base_controller). Now, the youbot behaves properly in simulation and does not go up in the air or starts tilting.

It has been tested under hydro and indigo.