moveit2
moveit2 copied to clipboard
robot_description value in RobotModelLoader
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.
Related: https://robotics.stackexchange.com/questions/104499/kinematic-parameters-naming
This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.
This issue was closed because it has been stalled for 45 days with no activity.
As a follow up of this issue, robot_model_loader must be created with (node, "robot_description") parameters, otherwise the node will not find the kinematic settings, nor joint_limits, nor acceleration limits