@nikolahm is your drone PID tuned? How are you flying in position mode? GPS based flight, VIO based flight, etc. What is the environment you are testing in, can you paste a log in here please?
Posts made by Zachary Lowell 0
-
RE: Heavy drift on VOXL 2
-
RE: (VOXL2 PX4 ROS2) MPA to ROS2 Tag Detection
Hi @GlennTee you need to do a git submodule update --init --recursive on the voxl mpa ros2 code base to pull in px4 ros msgs
Zach
-
RE: How to build-compile FOXY ROS2 packages and nodes for RB5
You need to push the install folder as thats where the executables live in ros2 once you run colcon build. src folder is just the code you wrote with zero executables after colcon build is run.
-
RE: How to build-compile FOXY ROS2 packages and nodes for RB5
@tahawaru said in How to build-compile FOXY ROS2 packages and nodes for RB5:
pushing your docker instance to the voxl2, then deploying the docker container, and running ros2 run command inside the docker container correct?
I build my docker container on the voxl2 and then run everything inside. I am unsure I am following what you are doing. If its easiest, just install docker on your voxl2, then build your container on there and call it a day.
The other option is to run on disk outside of a docker instance. The voxl2 supports ros2 foxy natively on disk. To install this you can just do
apt-get install voxl-ros2-foxy
- lmk if that helps. -
RE: VOXL2 ROS2 Starling Code Inconsistencies
@claw said in VOXL2 ROS2 Starling Code Inconsistencies:
@Zachary-Lowell-0 Thank you for your help and guidance. Is there a way to get the status information like battery voltage using Python?
Reply
@claw yes you can follow this post to get battery over the DDS: https://forum.modalai.com/topic/4353/voxl2-px4-ros2-mpa-to-ros2-for-battery-voltage-problems/12?_=1745355297145
-
RE: (VOXL2 PX4 ROS2) px4_msgs Unrecognized In Program
Did you ever install voxl-ros2-foxy?
-
RE: (VOXL2 PX4 ROS2) MPA to ROS2 Tag Detection
You should be doing cross compilation for things like this - aka on your computer running voxl-docker -i qrb5165-emulator and then building the debian and flashing to the voxl2.
So what I currently do to build is:
- clone mpa to ros2 on your parent computer
- cd into repository
- run voxl-docker -i qrb5165-emulator:1.5
- run ./install_build_deps.sh qrb5165 dev
- run ./build.sh qrb5165
- run ./make_package.sh
Push via adb or scp the deb from parent computer to voxl2 and then unpackage the deb and source the right directory.
LMK if that helps at all - if you need to install nlohmann json btw you should be doing it via
voxl-configure-mpa-to-ros2
Zach
-
RE: How to build-compile FOXY ROS2 packages and nodes for RB5
@tahawaru said in How to build-compile FOXY ROS2 packages and nodes for RB5:
_find_and_load_unlocked
to confirm @tahawaru you are pushing your docker instance to the voxl2, then deploying the docker container, and running ros2 run command inside the docker container correct? Prior to running the ros2 command in the docker instance you are sourcing the right packages? Usually the rosidl typesupport error occurs because you have not build the right package and if you have you never sourced the right directory - so in your case its necessary to run source /opt/ros/foxy/setup.bash (if you installed px4 msgs via apt-get) if you build them directly from the colcon env then you need to source the directory you built those messages in!
LMK if this helps.
Zach -
RE: (VOXL2 PX4 ROS2) px4_msgs Unrecognized In Program
@GlennTee have you sourced the right directories? If you run
source /opt/ros/foxy/mpa_to_ros/install/setup.bash
that should tell your package manager that the px4 messages type exists. I also notice you are running this on your local machine - have you install the necessary packages there? If you instantiate the voxl-cross or qrb5165 emulator image and then use vscode inside the docker then you should be able to see the px4 messages just fine.LMK if that helps!
Zach -
RE: (VOXL2 PX4 ROS2) MPA to ROS2 Tag Detection
@GlennTee one step ahead of you!
Going to be rleased on the next sdk release - if you want it now, feel free to build and install the package.
-
RE: ( VOXL2 PX4 ROS2) MPA to ROS2 for Battery Voltage & Problems
Also @GlennTee build this branch of px4 and then flash onto your voxl2 - it exposes battery_status over the uorb topic through the dds bridge, so now when you run ros2 topic list you still see /fmu/out/battery_status: https://github.com/modalai/px4-firmware/tree/zach/battery_status_ros2
This is also a PR currently into voxl-dev branch of PX4 so most likely will be a feautre of the next release.
Zach
-
RE: ( VOXL2 PX4 ROS2) MPA to ROS2 for Battery Voltage & Problems
@GlennTee are you sourcing the right directory?
source /opt/ros/foxy/mpa_to_ros2/install/setup.bash
then run the command you mentioned above.Zach
-
RE: VOXL2 ROS2 Starling Code Inconsistencies
@GlennTee said in VOXL2 ROS2 Starling Code Inconsistencies:
I also was wondering if there also a way to read the battery voltage? In my case, I want to be able to read the battery voltage in my code in able to tell the drone to do specific things based on if the voltage is high or low.
Reply
@GlennTee on the voxl2 there is a program called
voxl-tag-detection
that will detect tags in the h36 family. You can also detect battery viavoxl-inspect-battery
- the reason I bring these pipes up is because you can leverage them in your ros2 code via C++ nodes. So you can create a node in CPP that will subscribe to these modalAI MPA pipes and then publish the data into a ros2 topic.LMK if that helps - we actually did just merge in a branch of voxl-mpa-to-ros2 that will publish the tag information over a ros2 interface. In theory you can do the same with battery voltage: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2/-/blob/dev/colcon_ws/src/voxl_mpa_to_ros2/src/interfaces/tag_interface.cpp?ref_type=heads
Zach
-
RE: VOXL2 ROS2 Starling Code Inconsistencies
oh also please ensure you have offboard_figure_8 set to off in voxl-vision-hub.conf in /etc/modalai.
-
RE: VOXL2 ROS2 Starling Code Inconsistencies
@claw no worries - I recorded a loom for you watch - https://www.loom.com/share/409b4b9ca9974d54b534af7020414632 - please give it a gander and lmk if it helps - I have a strong feeling its because there is NOT a sleeper call for a second or two between swapping to offboard and arming the drone.
Also HITL/SITL testing by far and away is the standard to do first before moving to a drone especially with some experimental code - I would heavily emphasize you always debug first in this scenario before moving to the real bird - purely really just for safety reasons. Anyways, please give a watch and let me know!!
Zach
-
RE: VOXL2 ROS2 Starling Code Inconsistencies
@Zachary-Lowell-0 said in VOXL2 ROS2 Starling Code Inconsistencies:
Hi @GlennTee - will try and recreate this and get back to yuo!
C
1 Reply Last reply 10 minutes ago Replyplanning on trying to recreate tomorrow in the AM - have you tested this via HITL at all as well?
-
RE: VOXL2 ROS2 Starling Code Inconsistencies
Hi @GlennTee - will try and recreate this and get back to yuo!
-
RE: ROS2 VOXL2 Deserialization Errors
@GlennTee it looks like the version of px4 messages that was downloaded and built for the dds mismatches what px4 uorb messages are running in the system. I will take a look into this. Thanks!
-
RE: VOXL2/ROS2 Drone Runs Figure 8 Offboard Program Instead of My Program
@claw said in VOXL2/ROS2 Drone Runs Figure 8 Offboard Program Instead of My Program:
Ok, so some of the confusion was related to editing the Python example, but it's actually running the cpp code. With that corrected, it shows all of the expected topics in the "ros2 topic list" and the code sends the arm command to the correct topic according to "ros2 topic echo /uav_4/fmu/in/vehicle_command", however, the Starling doesn't arm. We're trusting the example code as to the data structure that is actually populated and sent to that topic. Is there a reference as to what that should be?
Reply
@claw what code are you referring to? The ros2 figure 8 code is written in python:
voxl-mpa-to-ros2 itself is written in CPP, but this node specific is in python as it can be either. With the DDS running, you do not need the voxl-mpa-to-ros2 code running as that just converts MPA to ros2, but regardless you dont need that running if the goal is just to publish to the dds via this ros2 node. How are you executing this?
ros2 run voxl_offboard_figure8 voxl_offboard_figure8
? -
RE: Which development environment is suitable to build ROS2 packages and nodes for the RB5
@tahawaru cant say that I can recreate this as the RB5 board is fully EOL and depracated.
As for the best ROS2 environment you can run via docker, I always leverage ros humble docker image to program on. Since you are rurnning SDK 1.1.2 I am unsure if the dds micro-agent is on that SDK - if the goal is to just use docker on the board and leverage ros2, I would recommend:
docker pull ros:humble-ros-base-jammy
OR
docker pull ros:humble-ros-desktop-jammy