Robot model parameter not found

asked 2019-08-28 21:18:34 -0500

FORGRESS gravatar image

I am trying to use setJointValueTarget function to set my manipulator in moveit. But the rosparam "robot_description" has been remapped to "iiwa/robot_description". As the result, when I use the code:

robot_model_loader::RobotModelLoader robot_model_loader("iiwa/robot_description");
robot_model::RobotModelPtr kinematic_model = robot_model_loader.getModel();
const robot_state::JointModelGroup* joint_model_groupL = kinematic_model->getJointModelGroup("manipulator");
std::vector<double> joint_values;
kinematic_state->copyJointGroupPositions(joint_model_groupL, joint_values);
joint_values[0] = 1.0;
joint_values[1] = -1.0;
moveit::planning_interface::MoveGroupInterface group("manipulator");
group.setJointValueTarget(joint_values);

It return warning info:

[ERROR] [1567044240.866666419]: Robot model parameter not found! Did you remap 'robot_description'?
[FATAL] [1567044240.866703135]: Unable to construct robot model. Please make sure all needed information is on the parameter server.

How should I do to put variable "group" into namespace "iiwa"? Thank you for your answer!

edit retag flag offensive close merge delete