Robotics StackExchange | Archived questions

Can't initialize effort_controllers/JointPositionController with non-global robot_description parameter

Here's an outline of my problem:

  1. I have multiple robots in Gazebo with different URDF descriptions. Each robot is pushed into a namespace (/robot1/...), and each frame id is pre-pended with a prefix (robot1....). Consequently, I have no robotdescription param in the global namespace.
  2. libgazeboroscontrol (running inside Gazebo) initializes ControllerManager. Gazebo runs in the global namespace.
  3. effort_controllers/JointPositionController (running inside Gazebo) calls urdf::Model::initParam which does not respect the controller's constructed namespace, and executes a searchParam in Gazebo's global namespace, which fails.

I can't figure out how to tell the controller to read the robotdescription from `robot1/robotdescription`.

Furthermore, It's unclear to me why the controller is trying to read the URDF independently in the first place. Why doesn't it get it from the controller manager?

Asked by piyushk on 2016-11-30 17:35:43 UTC

Comments

A guess, but: does the robotNamespace tag (in the urdf) influence this at all?

Asked by gvdhoorn on 2016-12-01 02:39:19 UTC

@gvdhoorn: Good suggestion. I'm using it already to ensure that gazebo_ros_control creates the controllers in the correct interface. But the NodeHandle is not passed to urdf::Model, so it doesn't solve the problem.

Asked by piyushk on 2016-12-02 09:57:43 UTC

I've filed an issue report here: https://github.com/ros-controls/ros_controllers/issues/244

Asked by piyushk on 2016-12-02 09:58:13 UTC

Answers