Jaeyoung-Lim / mav_dob

Disturbance Observer based trajectory tracking for MAVs
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

mavros problem? #3

Closed kimnerd closed 3 years ago

kimnerd commented 3 years ago

When I tried to catkin build as the instruction, I had the following error messages:

Errors     << mavros:make /home/htkim/catkin_ws/logs/mavros/build.make.000.log 
In file included from /home/htkim/catkin_ws/src/mavros/mavros/src/lib/enum_sensor_orientation.cpp:17:0:
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:70:40: error: ‘std::__cxx11::string mavros::utils::to_string’ redeclared as different kind of symbol
 std::string to_string(mavlink::common::MAV_AUTOPILOT e);
                                        ^~~~~~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:68:13: note: previous declaration ‘std::__cxx11::string mavros::utils::to_string(mavlink::common::MAV_SENSOR_ORIENTATION)’
 std::string to_string(mavlink::common::MAV_SENSOR_ORIENTATION e);
             ^~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:70:40: error: ‘MAV_AUTOPILOT’ is not a member of ‘mavlink::common’
 std::string to_string(mavlink::common::MAV_AUTOPILOT e);
                                        ^~~~~~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:70:40: note: suggested alternative:
In file included from /home/htkim/catkin_ws/devel/include/mavlink/v2.0/common/common.hpp:2290:0,
                 from /home/htkim/catkin_ws/src/mavros/libmavconn/include/mavconn/mavlink_dialect.h:26,
                 from /home/htkim/catkin_ws/src/mavros/mavros_msgs/include/mavros_msgs/mavlink_convert.h:18,
                 from /home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:22,
                 from /home/htkim/catkin_ws/src/mavros/mavros/src/lib/enum_sensor_orientation.cpp:17:
/home/htkim/catkin_ws/devel/include/mavlink/v2.0/common/../minimal/minimal.hpp:34:12: note:   ‘mavlink::minimal::MAV_AUTOPILOT’
 enum class MAV_AUTOPILOT : uint8_t
            ^~~~~~~~~~~~~
In file included from /home/htkim/catkin_ws/src/mavros/mavros/src/lib/enum_sensor_orientation.cpp:17:0:
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:71:40: error: ‘std::__cxx11::string mavros::utils::to_string’ redeclared as different kind of symbol
 std::string to_string(mavlink::common::MAV_TYPE e);
                                        ^~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:68:13: note: previous declaration ‘std::__cxx11::string mavros::utils::to_string(mavlink::common::MAV_SENSOR_ORIENTATION)’
 std::string to_string(mavlink::common::MAV_SENSOR_ORIENTATION e);
             ^~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:71:40: error: ‘MAV_TYPE’ is not a member of ‘mavlink::common’
 std::string to_string(mavlink::common::MAV_TYPE e);
                                        ^~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:71:40: note: suggested alternative: ‘AIS_TYPE’
 std::string to_string(mavlink::common::MAV_TYPE e);
                                        ^~~~~~~~
                                        AIS_TYPE
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:72:40: error: ‘std::__cxx11::string mavros::utils::to_string’ redeclared as different kind of symbol
 std::string to_string(mavlink::common::MAV_STATE e);
                                        ^~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:68:13: note: previous declaration ‘std::__cxx11::string mavros::utils::to_string(mavlink::common::MAV_SENSOR_ORIENTATION)’
 std::string to_string(mavlink::common::MAV_SENSOR_ORIENTATION e);
             ^~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:72:40: error: ‘MAV_STATE’ is not a member of ‘mavlink::common’
 std::string to_string(mavlink::common::MAV_STATE e);
                                        ^~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:72:40: note: suggested alternative: ‘MAV_FRAME’
 std::string to_string(mavlink::common::MAV_STATE e);
                                        ^~~~~~~~~
                                        MAV_FRAME
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:73:40: error: ‘std::__cxx11::string mavros::utils::to_string’ redeclared as different kind of symbol
 std::string to_string(mavlink::common::MAV_COMPONENT e);
                                        ^~~~~~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:68:13: note: previous declaration ‘std::__cxx11::string mavros::utils::to_string(mavlink::common::MAV_SENSOR_ORIENTATION)’
 std::string to_string(mavlink::common::MAV_SENSOR_ORIENTATION e);
             ^~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:73:40: error: ‘MAV_COMPONENT’ is not a member of ‘mavlink::common’
 std::string to_string(mavlink::common::MAV_COMPONENT e);
                                        ^~~~~~~~~~~~~
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:73:40: note: suggested alternative: ‘MAV_MODE’
 std::string to_string(mavlink::common::MAV_COMPONENT e);
                                        ^~~~~~~~~~~~~
                                        MAV_MODE
/home/htkim/catkin_ws/src/mavros/mavros/include/mavros/utils.h:114:18: error: ‘MAV_TYPE’ in namespace ‘mavlink::common’ does not name a type
 mavlink::common::MAV_TYPE mav_type_from_str(const std::string &mav_type);
                  ^~~~~~~~
make[2]: *** [CMakeFiles/mavros.dir/src/lib/enum_sensor_orientation.cpp.o] Error 1
make[1]: *** [CMakeFiles/mavros.dir/all] Error 2
make: *** [all] Error 2
Jaeyoung-Lim commented 3 years ago

You seem to have the wrong mavlink/mavros version. Which instructions are you following to install mavros?