Closed jgoppert closed 3 years ago
@jgoppert I have definitely received this error before, I can't remember exactly when and why though sorry! I remember "grepping" the type name through my entire computer and finding the right include through that.
@jgoppert Please let me know if you figure out what to include to get this to build properly. I am running into the same issues.
Hello, has anyone found the solution to this?
I'm running into the same issue. The hil messages seem to be defined in mavlink generated lib (which doesn't seem to be included in any of the packages specified in the HIL docs).
Any workaround for this? The full error on kinetic is:
[ 20%] Building CXX object CMakeFiles/rotors_hil_interface.dir/src/hil_sensor_level_interface.cpp.o
In file included from /home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:17:0:
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/include/rotors_hil_interface/hil_interface.h:105:3: error: ‘mavlink_hil_gps_t’ does not name a type
mavlink_hil_gps_t hil_gpsmsg;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/include/rotors_hil_interface/hil_interface.h:108:3: error: ‘mavlink_hil_sensor_t’ does not name a type
mavlink_hil_sensor_t hil_sensormsg;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/include/rotors_hil_interface/hil_interface.h:130:3: error: ‘mavlink_hil_state_quaternion_t’ does not name a type
mavlink_hil_state_quaternion_t hil_state_qtrnmsg;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp: In member function ‘virtual std::vector<mavrosmsgs::Mavlink<std::allocator
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:89:3: note: suggested alternatives:
In file included from /opt/ros/kinetic/include/mavlink/v2.0/common/../message.hpp:15:0,
from /opt/ros/kinetic/include/mavlink/v2.0/common/common.hpp:16,
from /opt/ros/kinetic/include/mavconn/mavlink_dialect.h:26,
from /opt/ros/kinetic/include/mavros_msgs/mavlink_convert.h:18,
from /home/v01d/ros/src/rotors_simulator/rotors_hil_interface/include/rotors_hil_interface/hil_interface.h:23,
from /home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:17:
/opt/ros/kinetic/include/mavlink/v2.0/common/../mavlink_types.h:121:4: note: ‘mavlink::mavlink_message_t’
}) mavlink_message_t;
^
/opt/ros/kinetic/include/mavlink/v2.0/common/../mavlink_types.h:121:4: note: ‘mavlink::mavlink_message_t’
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:105:5: error: ‘hil_gpsmsg’ was not declared in this scope
hil_gpsmsg.time_usec = time_usec;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:119:5: error: ‘mavlink_hil_gps_t’ was not declared in this scope
mavlink_hil_gps_t hil_gps_msg_ptr = &hil_gpsmsg;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:119:24: error: ‘hil_gps_msg_ptr’ was not declared in this scope
mavlink_hil_gps_t hil_gps_msg_ptr = &hil_gpsmsg;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:120:39: error: ‘mmsg’ was not declared in this scope
mavlink_msg_hil_gps_encode(1, 0, &mmsg, hil_gps_msg_ptr);
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:120:60: error: ‘mavlink_msg_hil_gps_encode’ was not declared in this scope
mavlink_msg_hil_gps_encode(1, 0, &mmsg, hil_gps_msg_ptr);
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:131:3: error: ‘hil_sensormsg’ was not declared in this scope
hil_sensormsg.time_usec = time_usec;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:147:3: error: ‘mavlink_hil_sensor_t’ was not declared in this scope
mavlink_hil_sensor_t hil_sensor_msg_ptr = &hil_sensormsg;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:147:25: error: ‘hil_sensor_msg_ptr’ was not declared in this scope
mavlink_hil_sensor_t hil_sensor_msg_ptr = &hil_sensormsg;
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:148:40: error: ‘mmsg’ was not declared in this scope
mavlink_msg_hil_sensor_encode(1, 0, &mmsg, hil_sensor_msg_ptr);
^
/home/v01d/ros/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:148:64: error: ‘mavlink_msg_hil_sensor_encode’ was not declared in this scope
mavlink_msg_hil_sensor_encode(1, 0, &mmsg, hil_sensor_msg_ptr);
^
CMakeFiles/rotors_hil_interface.dir/build.make:62: recipe for target 'CMakeFiles/rotors_hil_interface.dir/src/hil_sensor_level_interface.cpp.o' failed
make[2]: [CMakeFiles/rotors_hil_interface.dir/src/hil_sensor_level_interface.cpp.o] Error 1
make[1]: [CMakeFiles/rotors_hil_interface.dir/all] Error 2
CMakeFiles/Makefile2:249: recipe for target 'CMakeFiles/rotors_hil_interface.dir/all' failed
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Failed <<< rotors_hil_interface [ 9.7 seconds ]
[build] Summary: 1 of 2 packages succeeded.
[build] Ignored: 44 packages were skipped or are blacklisted.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: 1 packages failed.
[build] Runtime: 11.0 seconds total.
This should be fixed now, closing
I am working on fixing this. If I include the mavlink common header I get a bit further but get more errors. @gbmhunter have you run into this before?
If I use the indigo-devel branch as specified in rosinstall it works, but it would be good to use the version released with kinetic and get rotors to officially support kinetic.
Current, working workspace in kinetic: