I write a node to subscribe /move_group/display_planned_path to get the path,and publish to /mavros/setpoint_position/local.
But when i catkin_make the package,there is an error.
/home/sean/test/src/controller/src/controller.cpp: In member function ‘void Controller::traj_callback(const ConstPtr&)’:
/home/sean/test/src/controller/src/controller.cpp:42:22: error: ‘const _trajectory_type’ has no member named ‘joint_trajectory’
if(traj->trajectory.joint_trajectory.joint_names=="virtual_joint" && traj->trajectory[0].joint_trajectory.points.size()>0){
^
/home/sean/test/src/controller/src/controller.cpp:56:37: error: no matching function for call to ‘Controller::print_curr_pose(geometry_msgs::PoseStamped&)’
print_curr_pose(curr_pose_msg);
^
/home/sean/test/src/controller/src/controller.cpp:56:37: note: candidate is:
/home/sean/test/src/controller/src/controller.cpp:26:7: note: void Controller::print_curr_pose(const ConstPtr&)
void print_curr_pose(const geometry_msgs::PoseStamped::ConstPtr& pcp);
^
/home/sean/test/src/controller/src/controller.cpp:26:7: note: no known conversion for argument 1 from ‘geometry_msgs::PoseStamped’ to ‘const ConstPtr& {aka const boost::shared_ptr>>&}’
/home/sean/test/src/controller/src/controller.cpp:57:37: error: no matching function for call to ‘Controller::print_next_pose(geometry_msgs::PoseStamped&)’
print_next_pose(pub_traj_pose);
^
/home/sean/test/src/controller/src/controller.cpp:57:37: note: candidate is:
/home/sean/test/src/controller/src/controller.cpp:27:7: note: void Controller::print_next_pose(const ConstPtr&)
void print_next_pose(const geometry_msgs::PoseStamped::ConstPtr& pnp);
^
/home/sean/test/src/controller/src/controller.cpp:27:7: note: no known conversion for argument 1 from ‘geometry_msgs::PoseStamped’ to ‘const ConstPtr& {aka const boost::shared_ptr>>&}’
make[2]: *** [controller/CMakeFiles/controller.dir/src/controller.cpp.o] Error 1
make[1]: *** [controller/CMakeFiles/controller.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
I have added include_directories(
${catkin_INCLUDE_DIRS}
) to CMakeList.
But the error still appear.
Could any one help me with this error?
My ROS version is indigo with Ubuntu 14.04
↧