[ROS Q&A] 129 – Which ROS controllers required for PR2 ?

Which-ROS-controllers-required-for-PR2-

Written by Ricardo Tellez

18/06/2018

 

In this video we are going to see why a ROS developer can’t launch a PR2 Gazebo simulation, mainly because the ROS controllers are not found.

We will see which are the ROS packages which provide all the required controllers for the PR2. We will also see how you can apply this check to your own robot simulation, in case it complains about the controllers not being loaded.

This is a video trying to answer the following question posted at the ROS answers forum: https://answers.ros.org/question/294245/roslaunch-pr2_gazebo-pr2_empty_worldlaunch/

 

The following steps take throught the development as shown in the video

  • Open Robot Development Studio and create a new project (use a suitable name for project).
  • Launch the PR2 simulation by entering the following commands in a SHELL

    $ roslaunch pr2_gazebo pr2_empty_world.launch

It will take a while to load the simulation and we need to open a gazebo window (Tools>Gazebo) to see the visualization.

If the simulation doesn’t launch then we need to check for a few things

  • Controller manager : It is important that controller manager be running, we can check that with the following command

$ rosservice list| grep controller_manager

In the output of the above command, if you see enteries starting with /pr2_controller_manager/ that means everything is OK.

The different types of controllers available can be checked with command

$ rosservice call /pr2_controller_manager/list_controller_types

If you see controller types in the output of the above command then everything is OK.

We can check if these controllers are loaded or not using the following command

$ rosservice call /pr2_controller_manager/list_controllers

The above command should output various controllers and thier status.

Now the above case is for the working environment where all the required packages are installed. If some packages are missing then we should systematically look for packages and dependencies. The packages mostly fall into two categories: gazebo-ros controllers and robot specific controllers (pr2-controllers specifically for our case)

  • ros-control : To list the available ros-control packages use the following command

$ dpkg -l | grep ros-control

There are two important packages in this category ros-kinetic-gazebo-ros-control and ros-kinetic-ros-controllers

  • gazebo-ros : To list the available gazebo-ros related packages use the following command

$ dpkg -l | grep gazebo-ros

The output of the command should contain the following two names ros-kinetic-gezebo-ros and ros-kinetic-gezebo-ros-control (this one was seen in previous commands output also)

  • controller interfaces : To list the installed controller interface packages use the command

$ dpkg -l | grep controller-interface

The output of this command should show the following names ros-kinetic-controller-interface, ros-kinetic-controller-manager, ros-kinetic-controller-manager-msgs

  • controllers : In gazebo we use various controllers to actuate different types of joints. We need to check for the following ones
    • joint state controllers : The output of the following command should contain ros-kinetic-joint-state-controller

      $ dpkg -l | grep joint-state

    • joint trajectory controllers : The output of the following command should contain ros-kinetic-joint-trajectory-controller

      $ dpkg -l | grep joint-trajectory

    • effort controllers : The output of the following command should contain ros-kinetic-effort-controllers

      $ dpkg -l | grep effort-controllers

    • velocity controllers : The output of the following command should contain ros-kinetic-velocity-controllers

      $ dpkg -l | grep velocity-controllers

Finally we need to check for PR2 robot related controllers to be able to launch the simulation. Use the following commands

$ dpkg -l | grep pr2-controller $ dpkg -l | grep pr2-mechanism

We expect to see the following names in the output of those commands

  • ros-kinetic-pr2-controller-manager,
  • ros-kinetic-pr2-controller-interface,
  • ros-kinetic-pr2-controller-configuration-gazebo,
  • ros-kinetic-pr2-controllers-msgs,
  • ros-kinetic-pr2-mechanism-controllers,
  • ros-kinetic-pr2-mechanism-diagnostics,
  • ros-kinetic-pr2-mechanism-models,
  • ros-kinetic-pr2-mechanism-msgs

If we have all of these packages installed in our computer, we will be able to launch the pr2 robot. That’s all for this post. Thanks for watching the video, please leave your comments and subscribe the channel if you want to see more such videos.

RELATED LINKS AND RESOURCES

▸ Original question: https://answers.ros.org/question/294245/roslaunch-pr2_gazebo-pr2_empty_worldlaunch/
ROS Development Studio (RDS)
Robot Ignite Academy
ROS Control 101 online course

LIST OF ROS PACKAGES REQUIRED

1st- Gazebo – ROS controllers
* ros-kinetic-ros-control
* ros-kinetic-ros-controllers

* ros-kinetic-controller-interface
* ros-kinetic-controller-manager
* ros-kinetic-controller-manager-msgs

* ros-kinetic-gazebo-ros
* ros-kinetic-gazebo-ros-control

* ros-kinetic-joint-state-controller
* ros-kinetic-joint-trajectory-controller
* ros-kinetic-effort-controllers
* ros-kinetic-velocity-controllers

2nd- PR2 robot specific controllers

* ros-kinetic-pr2-controller-manager
* ros-kinetic-pr2-controllers
* ros-kinetic-pr2-controller-interface
* ros-kinetic-pr2-controller-configuration-gazebo

* ros-kinetic-pr2-mechanism-controllers
* ros-kinetic-pr2-mechanism
* ros-kinetic-pr2-mechanism-diagnostics
* ros-kinetic-pr2-mechanism-model


Feedback

Did you like this video? Do you have questions about what is explained? Whatever the case, please leave a comment on the comments section below, so we can interact and learn from each other.

If you want to learn about other ROS topics, please let us know on the comments area and we will do a video about it.

ros-control-course-banner

Topics: PR2 | ros control
Masterclass 2023 batch2 blog banner

Check Out These Related Posts

2 Comments

  1. rishabh

    Whenever I run pr2 _empty_world.launch(ros kinetic) and run the command “rosrun pr2_controller_manager pr2_controller_manager list” I get nothing , can you tell me what’s wrong I am doing???

    Reply
  2. Ricardo Tellez

    Very very likely you did not install the ROS packages that contain the PR2 controllers and the general ROS controllers.
    Check that you have installed the following ROS packages:
    ros-kinetic-ros-control
    ros-kinetic-ros-controllers
    ros-kinetic-controller-interface
    ros-kinetic-controller-manager
    ros-kinetic-controller-manager-msgs
    ros-kinetic-gazebo-ros
    ros-kinetic-gazebo-ros-control
    ros-kinetic-joint-state-controller
    ros-kinetic-joint-trajectory-controller
    ros-kinetic-effort-controllers
    ros-kinetic-velocity-controllers
    ros-kinetic-pr2-controller-manager
    ros-kinetic-pr2-controllers
    ros-kinetic-pr2-controller-interface
    ros-kinetic-pr2-controller-configuration-gazebo
    ros-kinetic-pr2-mechanism-controllers
    ros-kinetic-pr2-mechanism
    ros-kinetic-pr2-mechanism-diagnostics
    ros-kinetic-pr2-mechanism-mode

    Reply

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest

Share This