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

asked 2016-11-30 16:35:43 -0500

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 robot_description param in the global namespace.
  2. libgazebo_ros_control (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 robot_description from robot1/robot_description.

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?

edit retag flag offensive close merge delete


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

gvdhoorn gravatar image gvdhoorn  ( 2016-12-01 01:39:19 -0500 )edit

@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.

piyushk gravatar image piyushk  ( 2016-12-02 08:57:43 -0500 )edit

I've filed an issue report here:

piyushk gravatar image piyushk  ( 2016-12-02 08:58:13 -0500 )edit