Skip to content

robot_description value in RobotModelLoader #2407

@leander2189

Description

@leander2189

Description

Usual way of creating a RobotModelLoader instance is by setting the Options field with robot_description = "robot_description". This works ok, and the application will expect the kinematic parameters to be under robot_description_kinematics key, just like when launching move_group node.

On the other hand when Options is build by passing directly both the URDF and SRDF (why wait for a topic when I have access to the files), robot_description field is never set, and then the application will complain about kinematics not being defined, as it looks for _kinematics key.

This happens even if you manually set robot_description field manually in Options, as it builds RDFLoader through this line where the attribute robot_description is never set.

Your environment

  • ROS Distro: Humble
  • OS Version: e.g. Ubuntu 22.04
  • Binary build
  • If binary, which release version?

Steps to reproduce

Init your RobotModelLoader with urdf and srdf instead of robot_description field:

        const std::string robot_urdf = this->get_parameter("robot_description").as_string();
        const std::string robot_srdf = this->get_parameter("robot_description_semantic").as_string();
        robot_model_loader::RobotModelLoader::Options options(robot_urdf, robot_srdf);
        options.robot_description_ = "robot_description";
        auto robot_model_loader = std::make_shared<robot_model_loader::RobotModelLoader>(node_ptr, options);
        const moveit::core::RobotModelPtr &robot_model = robot_model_loader->getModel();

This warning will appear in the log

[dtc_test-5] [WARN 1696484568.119027388] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml! (loadKinematicsSolvers() at ./robot_model_loader/src/robot_model_loader.cpp:268)

Expected behaviour

Default behavior (loader expecting kinematics data under robot_description_kinematics) should not change depending on which constructor is called, and a method to manually change that key should be exposed, maybe by passing through robot_description field to RDFLoader in every case.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions