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

controllers behaviour in rrbot

asked 2017-05-24 04:31:01 -0600

Dear all,

I need your help to understand how the controllers are implemented and behave in a simple tutorial that I experiment.

I experiment with the a simple rrbot as it is described in the "Tutorial: ROS Control" in

So my first question is just a clarification. When I manually send a simple command such as:

rostopic pub -1 /rrbot/joint1_position_controller/command std_msgs/Float64 "data: 1.0"

it moves as expected by rotating the first joint image description

so I assume that since we move to the desired angle the actuator which is driven by the joint1_position_controller is locked and the rrbot stays there for the rest of the simulation until we send a new command (correct?).

Now comes my question. In order to spawn the joint controllers I use a launch file, as it referred in the tutorial.

roslaunch rrbot_control rrbot_control.launch

This launch file loads and starts the joint position controllers.

When I finish my experiments, I terminate this launch script (ctrl+c), and I can see that the script stops and and unloads the controllers. So it looks like:

[INFO] [WallTime: 1495615574.379552] [56.097000] Started controllers: joint_state_controller, joint1_position_controller, joint2_position_controller
^C[robot_state_publisher-2] killing on exit
[rrbot/controller_spawner-1] killing on exit
[INFO] [WallTime: 1495617523.980943] [1997.811000] Shutting down spawner. Stopping and unloading controllers...
[INFO] [WallTime: 1495617524.984322] [1998.820000] Stopping all controllers...
[INFO] [WallTime: 1495617524.986878] [1998.823000] Unloading all loaded controllers...
[INFO] [WallTime: 1495617524.987001] [1998.823000] Trying to unload joint2_position_controller
[INFO] [WallTime: 1495617524.993683] [1998.830000] Succeeded in unloading joint2_position_controller
[INFO] [WallTime: 1495617524.993904] [1998.830000] Trying to unload joint1_position_controller
[INFO] [WallTime: 1495617525.005732] [1998.837000] Succeeded in unloading joint1_position_controller
[INFO] [WallTime: 1495617525.005949] [1998.837000] Trying to unload joint_state_controller
[INFO] [WallTime: 1495617525.009021] [1998.840000] Succeeded in unloading joint_state_controller
shutting down processing monitor...
... shutting down processing monitor complete

The problem is that the rrbot (in gazebo) stays locked. I was expecting whenever we deactivating the controllers the rrbot to unlock and the links to return in their initial position following the gravity.

I tried manually, using the controller_manager, to load - start - stop - unload the controllers but I got the same behavior at the end.

So this is how it has been implemented or I'm doing something incorrect in the procedure?

(ubuntu 14.04, ros indigo, gazebo 2.2.3)

Thanks for your help, Angelos

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-24 04:51:22 -0600

gvdhoorn gravatar image

Most likely the position_controllers used are actually only forwarding controllers that use Gazebo's internal PID controllers to do the actual work of running the control.

Shutting down the outer controllers without also disabling the Gazebo controllers would then not change anything as those are still running.

edit flag offensive delete link more

Comments you mean that by disabling the outer controllers that are managed controller manager means that we just detach them from the inner Gazebo's PID controllers - this makes sense. So in order to get this realistic behavior I need to access those inner controllers. Thanks for your help!!!

angelos.p gravatar image angelos.p  ( 2017-05-24 05:00:20 -0600 )edit

Yes, but I must admit it was a bit of a guess / speculation. You might want to check that the position controllers used in the RRBot config are actually forwarding controllers, and that gazebo_ros_control makes use of the PID controller's of Gazebo internally.

gvdhoorn gravatar image gvdhoorn  ( 2017-05-24 05:02:43 -0600 )edit

Probably the answer lives inside the DefaultRobotHWSim as I see it in the diagram ( ). However, I don't have the required knowledge to find it and understand it :(

angelos.p gravatar image angelos.p  ( 2017-05-24 05:04:21 -0600 )edit

In the end of this tut, there are some suggestions of clearing the effort applying joints Hope it helps.

danacity gravatar image danacity  ( 2017-09-07 01:47:21 -0600 )edit

Question Tools


Asked: 2017-05-24 04:31:01 -0600

Seen: 615 times

Last updated: May 24 '17