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

Writing a realtime joint controller [Tutorial]

asked 2013-02-05 09:21:16 -0500

MartinW gravatar image

updated 2014-01-28 17:15:07 -0500

ngrennan gravatar image

Hello everyone,

I am doing the "Writing a realtime joint controller" tutorial. So far I have followed it closely and have checked that the plugin is visible to rospack using:

rospack plugins --attrib=plugin pr2_controller_interface

I can see the .xml file inside. Then when I go to the next tutorial, Running a realtime joint controller, it starts by launching the pr2 in Gazebo (which I do not want), rather I am using my own robot which publishes /joint_state, therefore I skipped to (4.) Running the Controller. I did the configuring but when I tried to check the status of other controllers by running:

rosrun pr2_controller_manager pr2_controller_manager list

I see nothing on the list. Does anyone what is going on here? Thanks in advance.

Kind Regards, Martin

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-07 11:54:13 -0500

IgorZ gravatar image

I think you got it right with other questions. You need a specific code defining transmission in your robot URDF to pr2_controller_manager to be able to see it.

edit flag offensive delete link more

answered 2013-02-09 04:01:23 -0500

Bharadwaj gravatar image

updated 2013-02-10 18:01:26 -0500

Hi, I too am facing the same problem. I have a urdf with the transmission elements in it. I tried to implement the a single joint control on it. I created a launch file and I open my model using roslaunch. I open a new terminal n follow the commands in the "running a real time joint controller" I can see my xml file in the plugin list but I do not see a .so file in the "lib" directory. Infact I do not know which lib directory I should check for it.

And do u need to add the description of the plugin in the urdf file ?


do u need those lines of script in the urdf file for you to be able to control a joint even if u are trying to control it by running the controller seperately like in the tutorial?

okay guys I added the following script in the urdf file

   <controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="">
      <interface:audio name="gazebo_ros_controller_manager_dummy_iface" />

I added this to the urdf file and I ran the model and I get a bunch of errors.

Error [] XML Element[controller:gazebo_ros_controller_manager], child of element[model] not defined in SDF. Ignoring.[model]
Error [] Error reading element <model>
Error [] Unable to read element <sdf>
Error [] parse as old deprecated model file failed.
Error [] Unable to read file[/usr/share/drcsim-1.3/models/hubo_leg/model.urdf]
Error [] Error reading element <world>
Error [] Unable to read element <sdf>
Error:   Could not find the 'robot' element in the xml file
         at line 61 in /tmp/buildd/ros-fuerte-urdfdom-0.2.3-1precise-20121011-0155/urdf_parser/src/model.cpp
Error [] Unable to call parseURDF on robot model
Warning [] SDF has no <sdf> element in file[urdf file]
Error [] parse as old deprecated model file failed.
Error [] Unable to read sdf file[]

I am not able to understand what these errors are telling me. Can we use the PR2 controllers on a urdf model and open it up in gazeb ?

edit flag offensive delete link more



plugin xml description informs gazebo that some program must be executed when the simulation is running, so yes it is necessary.

IgorZ gravatar image IgorZ  ( 2013-02-09 07:46:17 -0500 )edit

Yea IgorZ is right, and I think you need to check your CMakefile.txt to see if you're making the lib file, it should just show up in a lib folder after you compile the controller.cpp

MartinW gravatar image MartinW  ( 2013-02-09 09:32:15 -0500 )edit

I didn't add anything about a plugin in my urdf file, and I just used their default <gazebo> tags on the simple-urdf tutorial website. You don't add anything like <plugin> in the urdf, only declaring the class in your .cpp and exporting the plugin in your manifest.xml

MartinW gravatar image MartinW  ( 2013-02-11 07:08:51 -0500 )edit

I did add the above gazebo elements in the urdf file and I get that error . Do you know what those error mean ?

Bharadwaj gravatar image Bharadwaj  ( 2013-02-11 16:01:23 -0500 )edit

MartinW Can you tell me which lib folder I should check, I am particularly trying the writing a realtim joint controller. I dont know where I should look. And what shuold I check in my CMakefile.text file?

Bharadwaj gravatar image Bharadwaj  ( 2013-02-11 16:05:44 -0500 )edit

Yea I get the error when I .launch with the warehouse planner but the gazebo_worlds launch works fine with the tag. It must be something to do with that but I am unsure what the error means

MartinW gravatar image MartinW  ( 2013-02-12 05:32:09 -0500 )edit

Question Tools

1 follower


Asked: 2013-02-05 09:21:16 -0500

Seen: 1,058 times

Last updated: Feb 10 '13