SITL using VOXL2 PX4 software
-
Is it possible to run SITL using ModalAI's version of the PX4 software? I am using this repo https://github.com/modalai/px4-firmware/ and followed the same steps as I would with PX4's Autopilot repo:
- roslaunch my gazebo world
- in px4-firmware, make px4_sitl_default none
- start my own ros app
However, I recently discovered that there's the option to make modalai_voxl2 (instead of make px4_sitl_default), so I am not sure if I am actually using the ModalAI version. What is the correct way to do so?
I am unable to make modalai_voxl2 successfully:
$ make modalai_voxl2
-- PX4 version: v1.14.0-2.0.43-dev (1.14.0)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3")
-- PX4 config file: /home/xx/px4-firmware/boards/modalai/voxl2/default.px4board
-- PLATFORM posix
-- LINUX_TARGET y
-- TOOLCHAIN aarch64-linux-gnu
-- ROMFSROOT px4fmu_common
-- ROOTFSDIR /data/px4
-- PX4 config: modalai_voxl2_default
-- PX4 platform: posix
-- PX4 lockstep: disabled
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: /bin/aarch64-linux-gnu-gcc
CMake Error at CMakeLists.txt:219 (project):
The CMAKE_CXX_COMPILER:/bin/aarch64-linux-gnu-g++
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.CMake Error at CMakeLists.txt:219 (project):
The CMAKE_C_COMPILER:/bin/aarch64-linux-gnu-gcc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.CMake Error at CMakeLists.txt:219 (project):
The CMAKE_ASM_COMPILER:/bin/aarch64-linux-gnu-gcc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "/home/xx/px4-firmware/build/modalai_voxl2_default/CMakeFiles/CMakeOutput.log".
See also "/home/xx/px4-firmware/build/modalai_voxl2_default/CMakeFiles/CMakeError.log".
Error: /home/xx/px4-firmware/build/modalai_voxl2_default is not a directory
make: *** [Makefile:232: modalai_voxl2] Error 1 -
@kerct We have HITL documented here: https://docs.modalai.com/voxl2-PX4-hitl/
In SITL there would not be anything unique to test
-
@kerct you should be able to run SITL just fine - however keep in mind that a lot of the PX4 modules and drivers running on the voxl2 run on the DSP, not the linux side. SO based off this - if you run the SITL instance on your linux/posix machine - it will be leveraging the module that is built to run on the linux side not what would be running on the DSP - so it is kind of in vein.
Anyways - I would recommend if you want to test your ros code and your gazebo stuff, run the voxl2 in hitl. Here is a video explaining how to setup HITL on the board:
https://www.youtube.com/watch?v=ysvpJdXFWaM&ab_channel=AscendEngineering
Let us know if this helps!
-
@kerct The modalai_voxl2 target is for code running on the voxl2. SITL does not run on the VOXL2, it runs on your desktop computer. So, for that you use the px4_sitl_default target. If you use the modalai fork of the repo then you should use the voxl-dev branch. We do not normally test SITL on this branch so not sure if it is functional. We mostly use HITL since that is running our actual on target code and is much more representative of how things will work on a real drone.
-
@Moderator @Zachary-Lowell-0 @Eric-Katzfey Thanks for your replies! I am looking to do multi-vehicle simulation so SITL would be ideal, but I would definitely try out HITL too (although that would be limited to only 1 vehicle in the simulation right?)
-
@kerct We have not tried to do anything more than single vehicle.
-
That is correct it would only be able to support one vehicle. You can test SITL multi vehicles on your parent computer running SITL, however the modules and drivers running in that environment would differ from what is running on the voxl2.