Ask Your Question

How to change the robot_description paramter for the joint_trajectory_controller

asked 2017-07-25 08:12:55 -0600

Panda1638 gravatar image

Dear ROS community,

i am simulating a ABB IRB2400 robot arm in gazebo controlling it with MoveIt. This is working so far. My goal is to simulate two arms. So i moved them in different namespaces and give their descriptions different names. The Problem that now is occurring that the joint_trajectory_controllercant find the 'robot_description' parameter on the parameter server.

The errors i get are:

[ERROR] [1500973451.323217096, 0.454000000]: Could not find parameter robot_description on parameter server
[ERROR] [1500973451.323364757, 0.454000000]: Failed to parse URDF contained in 'robot_description' parameter
[ERROR] [1500973451.323468398, 0.454000000]: Failed to initialize the controller
[ERROR] [1500973451.323531930, 0.454000000]: Initializing controller 'arm_controller' failed
[ERROR] [WallTime: 1500973452.325133] [1.452000] Failed to load arm_controller

I looked up in the Wiki and the code and as far as i know there is no way to tell the joint_trajectory_controller to look for the robot description under a different name than 'robot_description'. Am i wrong? Is there a simple way i am overseeing?

If there is no way implemented i would like to do so. But i could use some enlightening on how to do that a good way. Entering the robot description in the yaml file describing the controller would be the way i would choose. But i have not yet found the part of the code wich parses the arguments from the yaml to the actual controller.

edit retag flag offensive close merge delete


I managed to implement the use of a different robot description. It was quite easy after i understood how everything works. I copied the joint_trajectory_controller package and renamed it. Than you need to register it under that name. To get a different description i added a parameter to the server.

Panda1638 gravatar imagePanda1638 ( 2017-08-01 05:18:52 -0600 )edit

Could you please elaborate on what was required to "register it under that name"?

drcra gravatar imagedrcra ( 2018-05-24 16:37:53 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-08-24 04:09:42 -0600

Panda1638 gravatar image

updated 2017-08-29 03:46:43 -0600

As my own comment said i managed to change the joint trajectory controller to get a parameter from the parameter server. If anyone is interested in details let me know.

Details: I basically just changed one line of code in the joint_trajectory_controller_impl.h from:

urdf::ModelSharedPtr urdf = getUrdf(root_nh, "robot_description");


std::string robot_description = "robot_description";
controller_nh_.getParam("robot_description", robot_description);
boost::shared_ptr<urdf::Model> urdf = getUrdf(root_nh, robot_description);

Now i can add robot_description : my_robot_description to the yaml file and the controller will look it up.

edit flag offensive delete link more


Yes, you should post the details here please.

jayess gravatar imagejayess ( 2017-08-24 11:13:06 -0600 )edit

I added them to my answer.

Panda1638 gravatar imagePanda1638 ( 2017-08-29 03:50:23 -0600 )edit

answered 2017-08-28 04:35:25 -0600

You can remap parameter just like topics, so for instance this works:

  <node pkg="robot_self_filter" type="self_filter" name="self_filter">
    <remap from="robot_description" to="robot_description_self_filter" />

For ros_control, things might be a little more complicated as the remapping has to be performed for the node, which is the controller_manager that loads a joint_trajectory_controller.

edit flag offensive delete link more


Thanks for your Answer. I was aware of that :) I solved the problem already myself, but i can't accept my own answer haha.

Panda1638 gravatar imagePanda1638 ( 2017-08-29 03:48:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-07-25 08:12:55 -0600

Seen: 931 times

Last updated: Aug 29 '17