0
$\begingroup$

Rosanswers logo

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.


Originally posted by Panda1638 on ROS Answers with karma: 16 on 2017-07-25

Post score: 0


Original comments

Comment by Panda1638 on 2017-08-01:
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.

Comment by drcra on 2018-05-24:
Could you please elaborate on what was required to "register it under that name"?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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");

To:

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.


Originally posted by Panda1638 with karma: 16 on 2017-08-24

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by jayess on 2017-08-24:
Yes, you should post the details here please.

Comment by Panda1638 on 2017-08-29:
I added them to my answer.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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" />
  </node>

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.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2017-08-28

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by Panda1638 on 2017-08-29:
Thanks for your Answer. I was aware of that :) I solved the problem already myself, but i can't accept my own answer haha.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.