Gazebo_Ros_control

1,549 views
Skip to first unread message

mfr...@vt.edu

unread,
Mar 5, 2014, 12:10:56 PM3/5/14
to ros-sig-ro...@googlegroups.com
Hey all ,

I am trying to use Moveit to send a trajectory to a robot in gazebo. From what I understand the way this will happen is by sending  a FollowJointTracjectory action msg from the moveit node to the gazebo_ros node. The way this will happen is by using Gazebo_ros_control to handle the gazebo side. I followed the tutorial on how to get gazebo_ros_control side to run (http://gazebosim.org/wiki/Tutorials/1.9/ROS_Control_with_Gazebo#Create_a_ros_controls_package). So I created a ros package , as well as a controller.yaml file as defined in the tutorial, I also added this line to my urdf file that has my robot model:

<gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/atlasarm</robotNamespace>
  </plugin>
</gazebo>

After doing all of this, I created an instance of my robot using gazebo, and then I tired running the gazebo_ros_control launch file that the tutorial asks me to in the section "Start the controllers Roslaunch" and when I do this, I get this warning:
[INFO] [WallTime: 1393262845.109880] [0.000000] Controller Spawner: Waiting for service controller_manager/load_controller
[WARN] [WallTime: 1393262875.363566] [41.470000] Controller Spawner couldn't find the expected controller_manager ROS interface.

And then the roslaunch file exits.  When I check to see if the control manager was ever running I use this command "rosservice list | grep controller_manager" and no controller_manager show up.


So here are my questions

1. How do I get an instance of a gazebo_ros_control controller manager to begun running?
2. Does this manager I reference to above have to be defined by me in source code?
3. I am having troubles with figuring out how moveit controller.yaml has to relate to the gazebo_ros_control controller.yaml. Reading through the tutorial it doesn't mention what some of the parameters mean (type, pid, ...etc)
4. If the moveit controllers.yaml file uses an action namespace of Follow_joint_trajectory , how does the gazebo_ros_control package know to look in that namespace? Do I need to create a node within the gazebo ros package that acts as action server and recieve messages through that action namespace? 

I have posted alot of my concerns to the moveit google group as well (https://groups.google.com/forum/#!topic/moveit-users/r1nd6-u_UGM). Its been really diffucult for me to understand how I am suppose to create this controllwemanager that interacts with gazebo, or if its already been created for me by gazebo_ros_control. 

Thanks
Mike

Adolfo Rodríguez Tsouroukdissian

unread,
Mar 6, 2014, 3:29:52 AM3/6/14
to Michael Francis, ros-sig-ro...@googlegroups.com
On Wed, Mar 5, 2014 at 6:10 PM, <mfr...@vt.edu> wrote:
Hey all ,

I am trying to use Moveit to send a trajectory to a robot in gazebo. From what I understand the way this will happen is by sending  a FollowJointTracjectory action msg from the moveit node to the gazebo_ros node. The way this will happen is by using Gazebo_ros_control to handle the gazebo side. I followed the tutorial on how to get gazebo_ros_control side to run (http://gazebosim.org/wiki/Tutorials/1.9/ROS_Control_with_Gazebo#Create_a_ros_controls_package). So I created a ros package , as well as a controller.yaml file as defined in the tutorial, I also added this line to my urdf file that has my robot model:

<gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/atlasarm</robotNamespace>
  </plugin>
</gazebo>

After doing all of this, I created an instance of my robot using gazebo, and then I tired running the gazebo_ros_control launch file that the tutorial asks me to in the section "Start the controllers Roslaunch" and when I do this, I get this warning:
[INFO] [WallTime: 1393262845.109880] [0.000000] Controller Spawner: Waiting for service controller_manager/load_controller
[WARN] [WallTime: 1393262875.363566] [41.470000] Controller Spawner couldn't find the expected controller_manager ROS interface.

And then the roslaunch file exits.  When I check to see if the control manager was ever running I use this command "rosservice list | grep controller_manager" and no controller_manager show up.


So here are my questions

Hi Mike,

Before getting into the details of your particular setup, have you tried following the tutorial you mention above step by step?. If you can reproduce the tutorial results on that particular robot, it's a good first step forward. Let me know how this goes.

Also, could you confirm which ROS distro you are using, and whether you are getting the ros_control related packages from binaries or building from source?.

Here go some answers to your questions:
 

1. How do I get an instance of a gazebo_ros_control controller manager to begun running?

Loading the gazebo_ros_control plugin from your robot description should be fine. Are there any suspicious log statements when you start your simulation?. Try lowering the log level to DEBUG, especially inside the "default_robot_hw_sim" namespace. The rqt_console and rqt_logger_level tools should make this easy.
 
2. Does this manager I reference to above have to be defined by me in source code?

No. Your setup consists of Gazebo + the default plugin im
 
3. I am having troubles with figuring out how moveit controller.yaml has to relate to the gazebo_ros_control controller.yaml. Reading through the tutorial it doesn't mention what some of the parameters mean (type, pid, ...etc)
4. If the moveit controllers.yaml file uses an action namespace of Follow_joint_trajectory , how does the gazebo_ros_control package know to look in that namespace? Do I need to create a node within the gazebo ros package that acts as action server and recieve messages through that action namespace? 

We can address these two points once you have a running controller manager.

Thanks for your patience,

Adolfo.


I have posted alot of my concerns to the moveit google group as well (https://groups.google.com/forum/#!topic/moveit-users/r1nd6-u_UGM). Its been really diffucult for me to understand how I am suppose to create this controllwemanager that interacts with gazebo, or if its already been created for me by gazebo_ros_control. 

Thanks
Mike

--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Adolfo Rodríguez Tsouroukdissian
Senior robotics engineer
adolfo.r...@pal-robotics.com
http://www.pal-robotics.com

PAL ROBOTICS S.L
c/ Pujades 77-79, 4º4ª
08005 Barcelona, Spain.
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
Skype: adolfo.pal-robotics
Facebook - Twitter - PAL Robotics YouTube Channel

AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited.  If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.

mfr...@vt.edu

unread,
Mar 6, 2014, 4:58:52 PM3/6/14
to ros-sig-ro...@googlegroups.com, Michael Francis, adolfo.r...@pal-robotics.com

Hey Adolfo,


I did follow the tutorial using the rrbot model, and found no issues in creating the controller manager and the position controllers. I was also able to use the rqt gui to control the arm in gazebo. This led me to realize a couple of mistakes I was making in my robot_control.launch file and controllers.yaml file that I cleaned up and was able to successfully  launch the controller manager. After getting the controller manager running I had to figure out how to use the load the correct controller ().I would like to mention that the tutorial doesn't explain how to update the controllers.yaml file based on what controller package is used. I still don't fully understand how the controllers.yaml file works, so any links to documentation would be appreciated.


I do also need a ros_controller package that handles “gripperCommand” type in order for moveit to open and close the gripper in gazebo. Is there a package for that available?



I finally understand how the controller manager creates an instance of arm_controller that uses the follow_joint_trajectory_action, this is great. .Still if you can answer the other questions that I asked from the previous post that would be great to help me strengthen my understanding of how to enable controllers.


In terms of gazebo I am having some problems as well, and maybe you can help me with them. For instance I read in gazbo tutorials that if you want to have the robot fixed to the world you need to create a dummy link and joint like below


  <link name="world"/>

  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="link1"/>
  </joint>

without this line my robot just falls to floor. But with this line my robot is constantly moving while the base is stuck to the ground. When I try to create a motion plan through moveit so that it translates to movement in gazebo, I get this warning in moveit basically saying that motion plan could not be achieved


[ INFO] [1394142038.621644143, 135.406000000]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.

[ WARN] [1394142038.621807287, 135.406000000]: Execution of motions should always start at the robot's current state. Ignoring the state supplied as start state in the motion planning request

[ INFO] [1394142038.621845774, 135.406000000]: Planning attempt 1 of at most 1

[ INFO] [1394142038.630518672, 135.415000000]: No planner specified. Using default.

[ INFO] [1394142038.630577650, 135.415000000]: LBKPIECE1: Attempting to use default projection.

[ INFO] [1394142038.632627269, 135.417000000]: LBKPIECE1: Starting with 1 states

[ INFO] [1394142038.741124299, 135.524000000]: LBKPIECE1: Created 22 (8 start + 14 goal) states in 12 cells (8 start (8 on boundary) + 4 goal (4 on boundary))

[ INFO] [1394142038.741182110, 135.524000000]: Solution found in 0.110527 seconds

[ INFO] [1394142038.754682630, 135.538000000]: Path simplification took 0.013451 seconds

[ WARN] [1394142041.673898947, 138.411000000]: Controller atlasarm/arm_controller failed with error code GOAL_TOLERANCE_VIOLATED

[ WARN] [1394142041.674029414, 138.411000000]: Controller handle atlasarm/arm_controller reports status ABORTED

[ INFO] [1394142041.894570956, 138.628000000]: ABORTED: Solution found but controller failed during execution :



I know the motion plan should have worked using just RVIZ. Any ideas to why my robot is jiggling around in place (in gazebo)and why the motion plan could not be achieved.


Thanks

Mike


Adolfo Rodríguez Tsouroukdissian

unread,
Mar 10, 2014, 11:21:39 AM3/10/14
to Michael Francis, ros-sig-ro...@googlegroups.com
On Thu, Mar 6, 2014 at 10:58 PM, <mfr...@vt.edu> wrote:

Hey Adolfo,


I did follow the tutorial using the rrbot model, and found no issues in creating the controller manager and the position controllers. I was also able to use the rqt gui to control the arm in gazebo. This led me to realize a couple of mistakes I was making in my robot_control.launch file and controllers.yaml file that I cleaned up and was able to successfully  launch the controller manager.


One step forward. Great!.

After getting the controller manager running I had to figure out how to use the load the correct controller ().I would like to mention that the tutorial doesn't explain how to update the controllers.yaml file based on what controller package is used. I still don't fully understand how the controllers.yaml file works, so any links to documentation would be appreciated.



Noted.

You don't really need to have all controller configurations in a single yaml file. In fact, it's often recommended to resort to separate files. The important thing is that the resulting ROS parameter server layout is the expected one, in terms of namespaces and loaded parameters. Take for instance the joint_state_controller, for most people, the defaults contained in [1] should be enough, so it's likely that people end up loading the parameters from that file.

For the joint_trajectory_controller in particular, you can find about of how to configure it in its ROS wiki page [2]. By now, if you can spawn a controller, you should be able to see its action topics, try doing

rostopic list | grep follow_joint_trajectory

If you're motivated enough, you can even manually send controllers commands using a tool like axclient.py (actionlib package).

I went ahead and populated the ROS wiki entry for the controller_manager with basic information (lending heavily from the original PR2 version) [3].


I do also need a ros_controller package that handles “gripperCommand” type in order for moveit to open and close the gripper in gazebo. Is there a package for that available?


 It has not been officially released, but Sachin Chitta recently controbuted such a controller [4]. I don't know how well MoveIt! integrates this controller on non-PR2 platforms.


[1] https://github.com/ros-controls/ros_controllers/blob/hydro-devel/joint_state_controller/joint_state_controller.yaml
[2] http://wiki.ros.org/joint_trajectory_controller
[3] http://wiki.ros.org/controller_manager
[4] https://github.com/ros-controls/ros_controllers/tree/hydro-devel/gripper_action_controller



I finally understand how the controller manager creates an instance of arm_controller that uses the follow_joint_trajectory_action, this is great. .Still if you can answer the other questions that I asked from the previous post that would be great to help me strengthen my understanding of how to enable controllers.


Your remaining questions:

3. I am having troubles with figuring out how moveit controller.yaml has to relate to the gazebo_ros_control controller.yaml. Reading through the tutorial it doesn't mention what some of the parameters mean (type, pid, ...etc)


See [2] for controller-specific docs.

4. If the moveit controllers.yaml file uses an action namespace of Follow_joint_trajectory , how does the gazebo_ros_control package know to look in that namespace? Do I need to create a node within the gazebo ros package that acts as action server and recieve messages through that action namespace?
 
It's up to you to make sure that the namespaces in which you spawned your controllers match those of the MoveIt! controller config.


In terms of gazebo I am having some problems as well, and maybe you can help me with them. For instance I read in gazbo tutorials that if you want to have the robot fixed to the world you need to create a dummy link and joint like below


  <link name="world"/>

  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="link1"/>
  </joint>

without this line my robot just falls to floor. But with this line my robot is constantly moving while the base is stuck to the ground. When I try to create a motion plan through moveit so that it translates to movement in gazebo, I get this warning in moveit basically saying that motion plan could not be achieved


I don't know about this one.


[ INFO] [1394142038.621644143, 135.406000000]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.

[ WARN] [1394142038.621807287, 135.406000000]: Execution of motions should always start at the robot's current state. Ignoring the state supplied as start state in the motion planning request

[ INFO] [1394142038.621845774, 135.406000000]: Planning attempt 1 of at most 1

[ INFO] [1394142038.630518672, 135.415000000]: No planner specified. Using default.

[ INFO] [1394142038.630577650, 135.415000000]: LBKPIECE1: Attempting to use default projection.

[ INFO] [1394142038.632627269, 135.417000000]: LBKPIECE1: Starting with 1 states

[ INFO] [1394142038.741124299, 135.524000000]: LBKPIECE1: Created 22 (8 start + 14 goal) states in 12 cells (8 start (8 on boundary) + 4 goal (4 on boundary))

[ INFO] [1394142038.741182110, 135.524000000]: Solution found in 0.110527 seconds

[ INFO] [1394142038.754682630, 135.538000000]: Path simplification took 0.013451 seconds

[ WARN] [1394142041.673898947, 138.411000000]: Controller atlasarm/arm_controller failed with error code GOAL_TOLERANCE_VIOLATED

[ WARN] [1394142041.674029414, 138.411000000]: Controller handle atlasarm/arm_controller reports status ABORTED

[ INFO] [1394142041.894570956, 138.628000000]: ABORTED: Solution found but controller failed during execution :


This looks like something actually got sent to the controllers. You can rostopic echo the controller/follow_joint_trajectory/goal topic to see if there's traffic.

HTH,

Adolfo.



I know the motion plan should have worked using just RVIZ. Any ideas to why my robot is jiggling around in place (in gazebo)and why the motion plan could not be achieved.


Thanks

Mike


--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages