mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
902 stars 993 forks source link

can't build trajectory.cpp #1061

Closed yc718764666 closed 6 years ago

yc718764666 commented 6 years ago

When compile the mavros I encountered the problem, I can not compile successfully. When build trajectory.cpp, if I comment the trajectory.cpp in Cmakelist, I compile it successfully.


MAVROS version and platform

Mavros: 0.26 ROS: Kinetic Ubuntu: 16.04

khancyr commented 6 years ago

Hello, Can you give us the compilation error in order to work on a correct fix ?

yc718764666 commented 6 years ago

OK, But it may be a little long [ 93%] Building CXX object mavros/mavros/CMakeFiles/mavros_plugins.dir/src/plugins/rc_io.cpp.o [ 94%] Building CXX object mavros/mavros_extras/CMakeFiles/mavros_extras.dir/src/plugins/vision_speed_estimate.cpp.o [ 94%] Building CXX object mavros/mavros/CMakeFiles/mavros_plugins.dir/src/plugins/command.cpp.o /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:136:53: error: ‘mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS’ has not been declared auto fill_points_unused_path(mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS & t, const size_t i) { ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:146:52: error: ‘mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS’ has not been declared void fill_points_all_unused(mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS &t, const size_t i) { ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:164:85: error: ‘TRAJECTORY_REPRESENTATION_WAYPOINTS’ in namespace ‘mavlink::common::msg’ does not name a type void fill_msg_position(geometry_msgs::Point &position, const mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS &t, const size_t i) ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:173:87: error: ‘TRAJECTORY_REPRESENTATION_WAYPOINTS’ in namespace ‘mavlink::common::msg’ does not name a type void fill_msg_velocity(geometry_msgs::Vector3 &velocity, const mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS &t, const size_t i) ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:182:95: error: ‘TRAJECTORY_REPRESENTATION_WAYPOINTS’ in namespace ‘mavlink::common::msg’ does not name a type void fill_msg_acceleration(geometry_msgs::Vector3 &acceleration, const mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS &t, const size_t i) ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:284:86: error: ‘mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS’ has not been declared void handle_trajectory(const mavlink::mavlink_message_t *msg, mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS &trajectory) ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘auto mavros::extra_plugins::TrajectoryPlugin::fill_points_unused_path(int&, std::size_t)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:137:5: error: request for member ‘vel_x’ in ‘t’, which is of non-class type ‘int’ t.vel_x[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:138:5: error: request for member ‘vel_y’ in ‘t’, which is of non-class type ‘int’ t.vel_y[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:139:5: error: request for member ‘vel_z’ in ‘t’, which is of non-class type ‘int’ t.vel_z[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:140:5: error: request for member ‘acc_x’ in ‘t’, which is of non-class type ‘int’ t.acc_x[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:141:5: error: request for member ‘acc_y’ in ‘t’, which is of non-class type ‘int’ t.acc_y[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:142:5: error: request for member ‘acc_z’ in ‘t’, which is of non-class type ‘int’ t.acc_z[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:143:5: error: request for member ‘vel_yaw’ in ‘t’, which is of non-class type ‘int’ t.vel_yaw[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::fill_points_all_unused(int&, std::size_t)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:147:5: error: request for member ‘pos_x’ in ‘t’, which is of non-class type ‘int’ t.pos_x[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:148:5: error: request for member ‘pos_y’ in ‘t’, which is of non-class type ‘int’ t.pos_y[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:149:5: error: request for member ‘pos_z’ in ‘t’, which is of non-class type ‘int’ t.pos_z[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:151:5: error: request for member ‘vel_x’ in ‘t’, which is of non-class type ‘int’ t.vel_x[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:152:5: error: request for member ‘vel_y’ in ‘t’, which is of non-class type ‘int’ t.vel_y[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:153:5: error: request for member ‘vel_z’ in ‘t’, which is of non-class type ‘int’ t.vel_z[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:155:5: error: request for member ‘acc_x’ in ‘t’, which is of non-class type ‘int’ t.acc_x[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:156:5: error: request for member ‘acc_y’ in ‘t’, which is of non-class type ‘int’ t.acc_y[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:157:5: error: request for member ‘acc_z’ in ‘t’, which is of non-class type ‘int’ t.acc_z[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:159:5: error: request for member ‘pos_yaw’ in ‘t’, which is of non-class type ‘int’ t.pos_yaw[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:160:5: error: request for member ‘vel_yaw’ in ‘t’, which is of non-class type ‘int’ t.vel_yaw[i] = NAN; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::fill_msg_position(geometry_msgs::Point&, const int&, std::size_t)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:166:70: error: request for member ‘pos_x’ in ‘t’, which is of non-class type ‘const int’ auto position_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.pos_x[i], t.pos_y[i], t.pos_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:166:82: error: request for member ‘pos_y’ in ‘t’, which is of non-class type ‘const int’ auto position_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.pos_x[i], t.pos_y[i], t.pos_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:166:94: error: request for member ‘pos_z’ in ‘t’, which is of non-class type ‘const int’ auto position_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.pos_x[i], t.pos_y[i], t.pos_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::fill_msg_velocity(geometry_msgs::Vector3&, const int&, std::size_t)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:175:70: error: request for member ‘vel_x’ in ‘t’, which is of non-class type ‘const int’ auto velocity_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.vel_x[i], t.vel_y[i], t.vel_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:175:82: error: request for member ‘vel_y’ in ‘t’, which is of non-class type ‘const int’ auto velocity_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.vel_x[i], t.vel_y[i], t.vel_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:175:94: error: request for member ‘vel_z’ in ‘t’, which is of non-class type ‘const int’ auto velocity_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.vel_x[i], t.vel_y[i], t.vel_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::fill_msg_acceleration(geometry_msgs::Vector3&, const int&, std::size_t)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:184:74: error: request for member ‘acc_x’ in ‘t’, which is of non-class type ‘const int’ auto acceleration_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.acc_x[i], t.acc_y[i], t.acc_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:184:86: error: request for member ‘acc_y’ in ‘t’, which is of non-class type ‘const int’ auto acceleration_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.acc_x[i], t.acc_y[i], t.acc_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:184:98: error: request for member ‘acc_z’ in ‘t’, which is of non-class type ‘const int’ auto acceleration_enu = ftf::transform_frame_ned_enu(Eigen::Vector3d(t.acc_x[i], t.acc_y[i], t.acc_z[i])); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::trajectory_cb(const ConstPtr&)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:204:3: error: ‘TRAJECTORY_REPRESENTATION_WAYPOINTS’ is not a member of ‘mavlink::common::msg’ mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS trajectory {}; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:206:47: error: ‘mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS’ has not been declared auto fill_point = [&](mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS & t, const RosPoints &rp, const size_t i) { ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In lambda function: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:209:24: error: ‘trajectory’ was not declared in this scope auto valid_so_far = trajectory.valid_points; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:216:27: error: request for member ‘pos_x’ in ‘t’, which is of non-class type ‘int’ fill_points_position(t.pos_x, t.pos_y, t.pos_z, rp.position, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:216:36: error: request for member ‘pos_y’ in ‘t’, which is of non-class type ‘int’ fill_points_position(t.pos_x, t.pos_y, t.pos_z, rp.position, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:216:45: error: request for member ‘pos_z’ in ‘t’, which is of non-class type ‘int’ fill_points_position(t.pos_x, t.pos_y, t.pos_z, rp.position, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:217:27: error: request for member ‘vel_x’ in ‘t’, which is of non-class type ‘int’ fill_points_velocity(t.vel_x, t.vel_y, t.vel_z, rp.velocity, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:217:36: error: request for member ‘vel_y’ in ‘t’, which is of non-class type ‘int’ fill_points_velocity(t.vel_x, t.vel_y, t.vel_z, rp.velocity, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:217:45: error: request for member ‘vel_z’ in ‘t’, which is of non-class type ‘int’ fill_points_velocity(t.vel_x, t.vel_y, t.vel_z, rp.velocity, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:218:31: error: request for member ‘acc_x’ in ‘t’, which is of non-class type ‘int’ fill_points_acceleration(t.acc_x, t.acc_y, t.acc_z, rp.acceleration_or_force, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:218:40: error: request for member ‘acc_y’ in ‘t’, which is of non-class type ‘int’ fill_points_acceleration(t.acc_x, t.acc_y, t.acc_z, rp.acceleration_or_force, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:218:49: error: request for member ‘acc_z’ in ‘t’, which is of non-class type ‘int’ fill_points_acceleration(t.acc_x, t.acc_y, t.acc_z, rp.acceleration_or_force, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:219:25: error: request for member ‘pos_yaw’ in ‘t’, which is of non-class type ‘int’ fill_points_yaw_wp(t.pos_yaw, rp.yaw, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:220:28: error: request for member ‘vel_yaw’ in ‘t’, which is of non-class type ‘int’ fill_points_yaw_speed(t.vel_yaw, rp.yaw_rate, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::trajectory_cb(const ConstPtr&)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:223:3: error: ‘trajectory’ was not declared in this scope trajectory.time_usec = req->header.stamp.toNSec() / 1000; //!< [milisecs] ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::path_cb(const ConstPtr&)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:251:3: error: ‘TRAJECTORY_REPRESENTATION_WAYPOINTS’ is not a member of ‘mavlink::common::msg’ mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS trajectory {}; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:253:3: error: ‘trajectory’ was not declared in this scope trajectory.time_usec = req->header.stamp.toNSec() / 1000; //!< [milisecs] ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:256:47: error: ‘mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS’ has not been declared auto fill_point = [&](mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS & t, const size_t i) { ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In lambda function: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:263:28: error: request for member ‘pos_x’ in ‘t’, which is of non-class type ‘int’ fill_points_position(t.pos_x, t.pos_y, t.pos_z, pose.position, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:263:37: error: request for member ‘pos_y’ in ‘t’, which is of non-class type ‘int’ fill_points_position(t.pos_x, t.pos_y, t.pos_z, pose.position, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:263:46: error: request for member ‘pos_z’ in ‘t’, which is of non-class type ‘int’ fill_points_position(t.pos_x, t.pos_y, t.pos_z, pose.position, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:264:25: error: request for member ‘pos_yaw’ in ‘t’, which is of non-class type ‘int’ fill_points_yaw_q(t.pos_yaw, pose.orientation, i); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:288:72: error: ‘TRAJECTORY_REPRESENTATION_WAYPOINTS’ in namespace ‘mavlink::common::msg’ does not name a type auto fill_msg_point = [&](RosPoints & p, const mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS & t, const size_t i) { ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: error: expected ‘)’ before ‘;’ token }; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In lambda function: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: error: expected ‘{’ before ‘;’ token /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp: In member function ‘void mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:296:78: error: request for member ‘time_usec’ in ‘trajectory’, which is of non-class type ‘int’ tr_desired->header = m_uas->synchronized_header("local_origin", trajectory.time_usec); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:298:34: error: request for member ‘valid_points’ in ‘trajectory’, which is of non-class type ‘int’ for (int i = 0; i < trajectory.valid_points; ++i) ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:303:27: error: request for member ‘valid_points’ in ‘trajectory’, which is of non-class type ‘int’ for (int i = trajectory.valid_points; i < NUM_POINTS; ++i) ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:315:52: error: no match for call to ‘(mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)>) (mavrosmsgs::Trajectory<std::allocator >::_point_1_type&, int&, int)’ fill_msg_point(tr_desired->point_1, trajectory, 0); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:315:52: note: candidate: void ()(mavros::extra_plugins::RosPoints&, int) {aka void ()(mavrosmsgs::PositionTarget<std::allocator >&, int)} /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:315:52: note: candidate expects 3 arguments, 4 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate: mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)> }; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate expects 2 arguments, 3 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:316:52: error: no match for call to ‘(mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)>) (mavrosmsgs::Trajectory<std::allocator >::_point_2_type&, int&, int)’ fill_msg_point(tr_desired->point_2, trajectory, 1); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:316:52: note: candidate: void ()(mavros::extra_plugins::RosPoints&, int) {aka void ()(mavrosmsgs::PositionTarget<std::allocator >&, int)} /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:316:52: note: candidate expects 3 arguments, 4 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate: mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)> }; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate expects 2 arguments, 3 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:317:52: error: no match for call to ‘(mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)>) (mavrosmsgs::Trajectory<std::allocator >::_point_3_type&, int&, int)’ fill_msg_point(tr_desired->point_3, trajectory, 2); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:317:52: note: candidate: void ()(mavros::extra_plugins::RosPoints&, int) {aka void ()(mavrosmsgs::PositionTarget<std::allocator >&, int)} /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:317:52: note: candidate expects 3 arguments, 4 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate: mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)> }; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate expects 2 arguments, 3 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:318:52: error: no match for call to ‘(mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)>) (mavrosmsgs::Trajectory<std::allocator >::_point_4_type&, int&, int)’ fill_msg_point(tr_desired->point_4, trajectory, 3); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:318:52: note: candidate: void ()(mavros::extra_plugins::RosPoints&, int) {aka void ()(mavrosmsgs::PositionTarget<std::allocator >&, int)} /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:318:52: note: candidate expects 3 arguments, 4 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate: mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)> }; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate expects 2 arguments, 3 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:319:52: error: no match for call to ‘(mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)>) (mavrosmsgs::Trajectory<std::allocator >::_point_5_type&, int&, int)’ fill_msg_point(tr_desired->point_5, trajectory, 4); ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:319:52: note: candidate: void ()(mavros::extra_plugins::RosPoints&, int) {aka void ()(mavrosmsgs::PositionTarget<std::allocator >&, int)} /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:319:52: note: candidate expects 3 arguments, 4 provided /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate: mavros::extra_plugins::TrajectoryPlugin::handle_trajectory(const mavlink_message_t, int&)::<lambda(mavros::extra_plugins::RosPoints&, int)> }; ^ /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:294:4: note: candidate expects 2 arguments, 3 provided In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h: In instantiation of ‘mavros::plugin::PluginBase::HandlerInfo mavros::plugin::PluginBase::make_handler(void (_C::)(const mavlink_message_t, _T&)) [with _C = mavros::extra_plugins::TrajectoryPlugin; _T = int; mavros::plugin::PluginBase::HandlerInfo = std::tuple<unsigned int, const char, long unsigned int, std::function<void(const mavlink::__mavlink_message, mavconn::Framing)> >; mavlink::mavlink_message_t = mavlink::mavlink_message]’: /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:58:60: required from here /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:103:23: error: ‘MSG_ID’ is not a member of ‘int’ const auto id = _T::MSG_ID; ^ /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:104:25: error: ‘NAME’ is not a member of ‘int’ const auto name = _T::NAME; ^ /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: error: no matching function for call to ‘std::tuple<unsigned int, const char, long unsigned int, std::function<void(const mavlink::__mavlink_message, mavconn::Framing)> >::tuple()’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:538:2: note: candidate: template<class _Alloc, class ... _UElements, class> std::tuple< >::tuple(std::allocator_arg_t, const _Alloc&, std::tuple<_Args2 ...>&&) tuple(allocator_arg_t tag, const _Alloc& a, ^ /usr/include/c++/5/tuple:538:2: note: template argument deduction/substitution failed: In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: note: cannot convert ‘id’ (type ‘’) to type ‘std::allocator_arg_t’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:529:2: note: candidate: template<class _Alloc, class ... _UElements, class> std::tuple< >::tuple(std::allocator_arg_t, const _Alloc&, const std::tuple<_Args2 ...>&) tuple(allocator_arg_t tag, const _Alloc& a, ^ /usr/include/c++/5/tuple:529:2: note: template argument deduction/substitution failed: In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: note: cannot convert ‘id’ (type ‘’) to type ‘std::allocator_arg_t’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:523:2: note: candidate: template std::tuple< >::tuple(std::allocator_arg_t, const _Alloc&, std::tuple< >&&) tuple(allocator_arg_t tag, const _Alloc& a, tuple&& in) ^ /usr/include/c++/5/tuple:523:2: note: template argument deduction/substitution failed: In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: note: cannot convert ‘id’ (type ‘’) to type ‘std::allocator_arg_t’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:519:2: note: candidate: template std::tuple< >::tuple(std::allocator_arg_t, const _Alloc&, const std::tuple< >&) tuple(allocator_arg_t tag, const _Alloc& a, const tuple& in) ^ /usr/include/c++/5/tuple:519:2: note: template argument deduction/substitution failed: In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: note: cannot convert ‘id’ (type ‘’) to type ‘std::allocator_arg_t’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:513:2: note: candidate: template<class _Alloc, class ... _UElements, class> std::tuple< >::tuple(std::allocator_arg_t, const _Alloc&, _UElements&& ...) tuple(allocator_arg_t __tag, const _Alloc& a, ^ /usr/include/c++/5/tuple:513:2: note: template argument deduction/substitution failed: In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: note: cannot convert ‘id’ (type ‘’) to type ‘std::allocator_arg_t’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:506:2: note: candidate: template std::tuple< >::tuple(std::allocator_arg_t, const _Alloc&, const _Elements& ...) tuple(allocator_arg_t tag, const _Alloc& a, ^ /usr/include/c++/5/tuple:506:2: note: template argument deduction/substitution failed: In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: note: cannot convert ‘id’ (type ‘’) to type ‘std::allocator_arg_t’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:502:2: note: candidate: template std::tuple< >::tuple(std::allocator_arg_t, const _Alloc&) tuple(allocator_arg_t tag, const _Alloc& a) ^ /usr/include/c++/5/tuple:502:2: note: template argument deduction/substitution failed: In file included from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17:0: /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:119:3: note: cannot convert ‘id’ (type ‘’) to type ‘std::allocator_arg_t’ }; ^ In file included from /home/yc/catkin_ws3/src/mavros/mavros/include/mavros/mavros_plugin.h:20:0, from /home/yc/catkin_ws3/src/mavros/mavros_extras/src/plugins/trajectory.cpp:17: /usr/include/c++/5/tuple:496:19: note: candidate: template<class ... _UElements, class> constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) constexpr tuple(tuple<_UElements...>&& in) ^ /usr/include/c++/5/tuple:496:19: note: template argument deduction/substitution failed: /usr/include/c++/5/tuple:489:19: note: candidate: template<class ... _UElements, class> constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) constexpr tuple(const tuple<_UElements...>& __in) ^ /usr/include/c++/5/tuple:489:19: note: template argument deduction/substitution failed: /usr/include/c++/5/tuple:484:17: note: candidate: constexpr std::tuple< >::tuple(std::tuple< >&&) [with _Elements = {unsigned int, const char*, long unsigned int, std::function<void(const mavlink::mavlink_message, mavconn::Framing)>}] constexpr tuple(tuple&&) = default; ^ /usr/include/c++/5/tuple:484:17: note: candidate expects 1 argument, 4 provided /usr/include/c++/5/tuple:482:17: note: candidate: constexpr std::tuple< >::tuple(const std::tuple< >&) [with _Elements = {unsigned int, const char, long unsigned int, std::function<void(const mavlink::mavlink_message*, mavconn::Framing)>}] constexpr tuple(const tuple&) = default; ^ /usr/include/c++/5/tuple:482:17: note: candidate expects 1 argument, 4 provided /usr/include/c++/5/tuple:479:19: note: candidate: template<class ... _UElements, class> constexpr std::tuple< >::tuple(_UElements&& ...) constexpr tuple(_UElements&&... elements) ^ /usr/include/c++/5/tuple:479:19: note: template argument deduction/substitution failed: /usr/include/c++/5/tuple:472:17: note: candidate: constexpr std::tuple< >::tuple(const _Elements& ...) [with _Elements = {unsigned int, const char, long unsigned int, std::function<void(const mavlink::__mavlink_message, mavconn::Framing)>}] constexpr tuple(const _Elements&... __elements) ^ /usr/include/c++/5/tuple:472:17: note: conversion of argument 1 would be ill-formed: /usr/include/c++/5/tuple:468:17: note: candidate: constexpr std::tuple< >::tuple() [with _Elements = {unsigned int, const char, long unsigned int, std::function<void(const mavlink::__mavlink_message, mavconn::Framing)>}] constexpr tuple() ^ /usr/include/c++/5/tuple:468:17: note: candidate expects 0 arguments, 4 provided mavros/mavros_extras/CMakeFiles/mavros_extras.dir/build.make:302: recipe for target 'mavros/mavros_extras/CMakeFiles/mavros_extras.dir/src/plugins/trajectory.cpp.o' failed make[2]: [mavros/mavros_extras/CMakeFiles/mavros_extras.dir/src/plugins/trajectory.cpp.o] Error 1 make[2]: 正在等待未完成的任务.... [ 95%] Building CXX object mavros/mavros/CMakeFiles/mavros_plugins.dir/src/plugins/local_position.cpp.o [ 95%] Building CXX object mavros/mavros/CMakeFiles/mavros_plugins.dir/src/plugins/global_position.cpp.o [ 95%] Building CXX object mavros/mavros/CMakeFiles/mavros_plugins.dir/src/plugins/setpoint_position.cpp.o

TSC21 commented 6 years ago

There's a mavlink ROS release done that fixes this. Check https://github.com/mavlink/mavlink-gbp-release. If you don't want to wait till it gets to the Linux deb pkg list, you will have to clone it to your ws and recompile.

yc718764666 commented 6 years ago

@TSC21 Thank your advice!