Use a catkin package in another package
Hi,
I am on ROS Melodic, Ubuntu 18.04
I have the trac_ik package in my catkin workspace. When I do catkin_make
, everything goes well. I have another package arm_moveit_config
in which I modified the kinematics_solver
in kinematics.yaml
from the default kdl_kinematics_plugin/KDLKinematicsPlugin
to trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin
. But when I run the my program an error pops up at
```
const robot_state::JointModelGroup* joint_model_group1 = move_group.getCurrentState()->getJointModelGroup(planning_group_);
std::vector<std::string> jointNames = joint_model_group1->getSolverInstance()->getJointNames();
```
which says The kinematics plugin (arm) failed to load. Error: Could not find library corresponding to plugin trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. Kinematics solver could not be instantiated for joint group arm
I know this can be solved if I install trac_ik using sudo apt-get install ros-melodic-trac-ik-kinematics-plugin
but I would like to know where I should modify to get the trac_ik kinematics plugin work
MoveIt's tutorial just says to add the package to the catkin workspace but I find that there could be something missing.
Any help would be really appreciated Thanks
Ideally it should work out of the box. I am using it with melodic.
by any chance if you have installed anything related to track-IK using apt, it can cause issue. so remove anything do
sudo apt remove ros-melodic-trac-ik*
.To answer your question, here you can rename the solver plugin class name. Which should be same as what you put in the
kinematics.yaml
.After that can you try building only
track_ik_kinematics_plugin
may be usingcatkin build
?