Home | Tutorials | Wiki | Issues
Ask Your Question
1

Kobuki/Turtlebot doesn't move when given velocity commands in Gazebo 5

asked 2015-04-02 20:21:10 -0500

haidai gravatar image

updated 2015-04-02 20:24:09 -0500

I'm using ROS Indigo with Gazebo 5 and kobuki_desktop compiled from source. The Kobuki shows up and can be moved when given a force on its wheel_left_joint and wheel_right_joint but does not move when libgazebo_ros_kobuki.so set SetVelocity commands. I can see that the wheels ALSO spins in this case, but there isn't forward movement aside from some jittering.

In Gazebo 2, this used to work fabulously. Does anyone know what in particular changed between these Gazebo 2 & 5 that is breaking it?

World Used: empty.world

URDF Used: kobuki.urdf.xacro

edit retag flag offensive close merge delete

Comments

I think I know why this happened, and I think it's related to a change in gazebo to enable Coulomb joint friction. Let me see if I can fix it...

scpeters gravatar imagescpeters ( 2015-04-03 19:32:37 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-04-03 19:55:30 -0500

scpeters gravatar image

For gazebo5, we decided to add Coulomb joint friction using the ODE joint motors (see pull request 1218 and pull request 1221). This raised a conflict with the SetVelocity and SetMaxForce API, which was also using the ODE joint motors. However, not all physics engines have joint motors (such as simbody), so we changed the meaning of SetVelocity to refer to setting the velocity state (like an initial condition), but not turning on a persistent motor controller.

The ODE joint motors are still available using the Joint::SetParam API:


joint->SetVelocity(index, velocity);
// becomes
joint->SetParam("vel", index, velocity);

and


joint->SetMaxForce(index, maxForce);
// becomes
joint->SetParam("max_force", index, maxForce);

I had also changed the behavior of the some of the gazebo plugins, which was probably a bad idea. I've restored their functionality in branch restore_max_force5. I'm guessing gazebo_ros_pkgs might need to be updated too.

Let me know if this is helping. If so, I'll make a gazebo_ros_pkgs pull request.

edit flag offensive delete link more

Comments

1

I'm having a similar issue with gazebo6 but seem to get mixed behavior: SetParam("max_force"...) and SetVelocity(...) is the combination that gets my simulation to work. Here's the question I asked on it: http://robotics.stackexchange.com/questions/8893/gazebo-moving-joint-with-model-plugin

raequin gravatar imageraequin ( 2016-01-14 19:05:01 -0500 )edit
0

answered 2015-04-03 23:59:40 -0500

haidai gravatar image

Ahh that makes sense. As when I comment out the calls to SetMaxForce in kobuki_gazebo_plugins, the robot seems to behave similarly to how it did in Gazebo 2 (gazebo_ros_kobuki_updates.cpp line 181).

edit flag offensive delete link more

Comments

Have you tried using SetParam instead? If it works, we should make a pull request to gazebo_ros_pkgs

scpeters gravatar imagescpeters ( 2015-04-06 19:19:56 -0500 )edit

It works fine for me with SkidSterring plugin in gazebo_ros_pkgs. I am willing to make the pull request, but first I wanted to ask if SetParam works with Gazebo versions <5.0, otherwise a compile time check is neeeded

clynamen gravatar imageclynamen ( 2015-04-14 09:19:30 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2015-04-02 20:21:10 -0500

Seen: 4,548 times

Last updated: Apr 03 '15