px4-offboard
px4-offboard copied to clipboard
Add a new c++ node offboard example
I have moved all python-related content to a separate package and created a parallel c++-package. Instructions on how to use it are in a nested README.md
@Jaeyoung-Lim thanks for the review, glad I can contribute to the PX4 community.
What do you suggest with respect to the naming and directory structure?
What would be the advantage of merging both the python node and the c++ node into the same package? With the packages separated, a user could add a COLCON_IGNORE
file to one package to just use the other one, which is why I have implemented it in this way.
One other thought: One thing that would be nice to add at some point is the same RVIZ functionality that you have for the python code.
Hello and thanks for your contribution,
I tested the cpp version and faced the issue you mentioned in the Troubleshooting part of the ReadMe : the offboard control mode won't be applied to the SITL version of PX4. If I use the commander mode offboard
to switch to offboard control mode, it works very fine. Do you have any clue on what is the problem with the VEHICLE_CMD_DO_SET_MODE ?
Do you have any clue on what is the problem with the VEHICLE_CMD_DO_SET_MODE ?
@TheotimeBalaguer There should be no problem with sending a switch mode command with mavlink. How are you sending this mavlink command?
How are you sending this mavlink command?
I am using this function, which send an OffboardControlMode
with only the position
flag on true.
@TheotimeBalaguer That is not related to VEHICLE_CMD_DO_SET_MODE
. VEHICLE_CMD_DO_SET_MODE
is a mavlink message
You are right my bad ! I guess it has something to do with px4_msgs::msg::OffboardControlMode
not working as expected. I'll have a look today.