Skip to content

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

@piyushk

Description

@piyushk

Ref: http://answers.ros.org/question/249138/cant-initialize-effort_controllersjointpositioncontroller-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 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 each controller is trying to read the URDF independently in the first place. Doesn't it make more sense to use the controller manager.

If this issues needs a patch, and I can provide one. Would an acceptable solution be that I duplicate Model's search inside a controller, since the controller has the correct NodeHandle?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions