RosTopics for voxl-flight
-
I'm new to UAV development and have a ModalAI VOXL Flight Deck. I've set up the hardware (battery, receiver, motors, propellers) and can receive sensor data using ros_to_mpa. However, I'm struggling with the following:
-
list itemHow can I send commands to the motor controllers? Are there ROS libraries or packages to publish cmd_vel to the motors?
-
list itemCan I use MAVSDK in a Docker container to control the motors?
After updating to VOXL-SDK 1.2.0, I can't find PX4-related files.
Do I need to install PX4 firmware or additional packages separately
What's the recommended method for controlling the motors on the VOXL Flight Deck
I've tried various approaches but haven't been successful. Any guidance or resources would be greatly appreciated. -
-
@voxl-phoenix since you are on a flight deck and not a voxl2 - you cannot run ROS2 only ros melodic - because of this you can NOT leverage the DDS in voxl-px4 to stream in messages to control the UAV over ros2 (https://docs.modalai.com/ros2-installation-voxl2/) - however you CAN leverage mavsdk absolutely to control the drone programmatically.
In order to do this you will need to create a mavsdk docker file on your parent computer and push it to the uav over adb (push the tarball to the drone and load it via docker load -i TAR) - https://gitlab.com/voxl-public/voxl-docker-images/voxl-docker-mavsdk - once this is done, go into /etc/modalai/voxl-vision-hub.conf and enable localhost forwarding on port 14551.
Once this is done you can run the docker file and implement controls via mavsdk (https://github.com/mavlink/MAVSDK-Python) - there is also a C++ library if you are more comfortable with that.
As for px4 firmware and all of those packages, they are on there by default. The recommended method of controlling the motors in general is over the firmware PX4 which is on the bird out the gate and you can leverage something like QGroundControl to actually fly - otherwise if you wish to control autonomously without a controller then you can leverage mavsdk
Zach
-
@Zachary-Lowell-0
thank you so much, Zach. I understood the error that I got, My sole purpose is to fly autonomously without using GPS I want to add LIDAR for mapping as well. so I wanted to know how can I use ros in the voxl-flight. but I find it very hard to develop on the voxl-flight because of the support issues.
thank you for your support. I will try to install MAVSDK using Docker. Thank you so much. -
Sounds good @voxl-phoenix ! Goodluck - the VOXL2 is radically easier to interface with due to ubuntu 18.04 being the OS vs yocto so my recommendation is to migrate to that if you have the ability - if not, let me know how the mavsdk side of things goes!
Zach