Hi @modaltb ,
I tried to build the voxl-px4 with the voxl-dev branch (which includes the micrortps_bridge).
- On an Ubuntu 20.04 machine, we followed the steps in VOXL 2 PX4 Build Guide to build the rb5-flight-px4-build-docker. This was successful.
- On the same machine, we
git cloned
the voxl-px4 repository and git updated
the submodules (of which px4-firmware
is one of them).
- Inside of the
voxl-px4
directory, we ran ./run_docker.sh
, which started the docker container and gave us a shell inside the docker container (at /usr/local/workspace
).
- Inside of the docker, at
/usr/local/workspace
, we installed fastrtpsgen (i.e., Fast-DDS, Fast-DDS-python, Fast-DDS-Gen).
- We then ran the following commands:
git clone px4-firmware
cd px4-firmware
git checkout voxl-dev
git submodule update --init --recursive
vi px4-firmware/board/modalai/rb5-flight/default.cmake
# Uncomment the micrortps_bridge at line 90
# save and exit
cd /usr/local/workspace
source /home/build-env.sh
./clean.sh
./build.sh
This last step failed with two errors:
ERROR #1
-- fastrtpsgen version 1.0.4
Traceback (most recent call last):
File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 233, in <module>
else Classifier(os.path.join(msg_dir, args.yaml_file), msg_dir))
File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 55, in __init__
self.check_if_listed(yaml_file)
File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 139, in check_if_listed
raise AssertionError(
AssertionError:
The following messages are not listen under /usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_message_ids.yaml: imu_server, parameter_server_set_used_request, parameter_server_set_used_response, parameter_client_reset_response, mavlink, parameter_client_set_value_response, parameter_server_set_value_request, parameter_server_set_value_response, parameter_client_reset_request, parameter_client_set_value_request
Please add them to the yaml file with the respective ID and, if applicable, mark them to be sent or received by the micro-RTPS bridge.
NOTE: If the message has multi-topics (#TOPICS), these should be added as well.
CMake Error at src/modules/micrortps_bridge/CMakeLists.txt:58 (string):
string sub-command FIND requires 3 or 4 parameters.
Traceback (most recent call last):
File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 233, in <module>
else Classifier(os.path.join(msg_dir, args.yaml_file), msg_dir))
File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 55, in __init__
self.check_if_listed(yaml_file)
File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 139, in check_if_listed
raise AssertionError(
AssertionError:
The following messages are not listen under /usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_message_ids.yaml: imu_server, parameter_server_set_used_request, parameter_server_set_used_response, parameter_client_reset_response, mavlink, parameter_client_set_value_response, parameter_server_set_value_request, parameter_server_set_value_response, parameter_client_reset_request, parameter_client_set_value_request
Please add them to the yaml file with the respective ID and, if applicable, mark them to be sent or received by the micro-RTPS bridge.
NOTE: If the message has multi-topics (#TOPICS), these should be added as well.
CMake Error at src/modules/micrortps_bridge/CMakeLists.txt:74 (string):
string sub-command FIND requires 3 or 4 parameters.
We checked the uorb_rtps_message_ids.yaml which specifies the message’s id. It doesn't have the messages described in the error line. Can you help us whether we should add these message_ids to the file (or remove them from elsewhere)?
ERROR #2
[ 45%] Built target rc
make[3]: Entering directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
Scanning dependencies of target lib__rc__rc_tests
make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
make[3]: Entering directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
[ 45%] Building CXX object src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/RCTest.cpp.o
/usr/local/workspace/px4-firmware/src/lib/rc/rc_tests/RCTest.cpp: In member function ‘bool RCTest::crsfTest()’:
/usr/local/workspace/px4-firmware/src/lib/rc/rc_tests/RCTest.cpp:96:88: error: too few arguments to function ‘uint32_t crsf_parse(uint64_t, const uint8_t*, unsigned int, uint16_t*, uint16_t*, uint16_t, uint8_t*, uint8_t*)’
96 | bool result = crsf_parse(now, frame, frame_len, rc_values, &num_values, max_channels);
| ^
compilation terminated due to -Wfatal-errors.
make[3]: *** [src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/build.make:63: src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/RCTest.cpp.o] Error 1
make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
make[2]: *** [CMakeFiles/Makefile2:8186: src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/all] Error 2
make[2]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
make[1]: *** [Makefile:152: all] Error 2
make[1]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
make: *** [Makefile:222: modalai_rb5-flight_default] Error 2
We checked the crsf_parse and it requires two additional arguments, leading us to believe that we have mismatched code versions. Can you help us know whether this is true (and if so, how we can bring all the SW versions into sync)?
For reference, the complete log from running build.sh
can be found here