Closed yc718764666 closed 6 years ago
Hello, Can you give us the compilation error in order to work on a correct fix ?
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
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.
@TSC21 Thank your advice!
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