I am currently working on a Pixhawk 6c on a holybro S500. I would like to make an offboard control from ros2 on the onboard jetson nano via a serial link. The jetson nano is running ubuntu 20.04 with ros2 foxy. The pixhawk 6C has px4 v1.13. Communication between the autopilot and the jetson is via rtps client/agent. I followed this tutorial ( Help with uXRCE-DDS to serial connection - Pixhawk 6c - #11 by Mitch ) for the most part, but using a normal version of the operating system (wifi required). See configuration details below. The drone can be armed using the offboard_control node in the px4_ros _com package. But that’s all. The drone never takes off as it should with this node. I’ve spent a lot of time trying to figure out why, and at this stage I’m out of ideas.
Am I missing a configuration parameter? The issue come from the ROS node or somewhere else? Did someone manage to use this node on a real drone (not simulation)?
Thank you for any help.
Pixhawk 6C - PX4 v1.13 > serial link> Jetson nano - ubuntu 20.04 - ros2 foxy (px4_msgs & px4_ros_com 1.13 release).
QGroundControl on my laptop with telemetry communication.
Communication via rtps ok. Drone arm, messages visualized on MAVLink consol on QGC.
No RC controller, only a joystick (Playstation 3 controller). Manual control via joystick works well.
GPS not mounted on drone
drone arms but never takes off when running the example node offboard_control from px4_ros_com.
I do fly using offboard mode, but I don’t arm it using the ros2 node. I also dont change its flight mode from manual to offboard using the ros2 node. These two steps are done by rc transmitter that I hold in my hand. I have mapped switches on the RC to do this. I just run the node and whenever I want to fly, I flip the switch in order of arming and changing the flight mode.
Check in QGC if your flight mode is in offboard mode after arming. Then only it will fly. You can manually change to offboard mode in QGC too.
A question why you are not using px4 v1.14? It’s the latest one and has good documentation.
Another question, are you using the offboard example given in PX4 docs to fly your S500?
Thank you for your answer.
I’m using a playstation controler as i don’t have an RC. I assigned the offboard mode to some button but when pushing it , the mode doesn’t switch. The same when changing manually in QGC. Is there something in my configuration that prevent to switch to offboard mode? Does the joystick instead of the RC matter?
I’m using v1.13 because of that post Help with uXRCE-DDS to serial connection - Pixhawk 6c saying thats it’s not working^^. You’re using v1.14? which companion computer do you use? how it is link to the autopilot?
Yes i’m using the offboard_control.cpp example in the ros2 package px4_ros_com.
So PX4 can be controlled using a joystick. You just need to set the parameter COM_RC_IN_MODE as mentioned here https://docs.px4.io/main/en/getting_started/rc_transmitter_receiver.html.
What about your state estimation? Are you flying indoors? If yes, then are you using vision estimates and sending them to pixhawk? Without proper estimates you will be denied mode change to Offboard.
These are my guess, I would like if you can share you log file so we can see what the reason for mode change denial is.
My setup is a pixhawk 4 with a raspberry pi 4 linked using serial connection on TXD RXD Ground pins on pi to telem port on pixhawk. https://docs.px4.io/main/en/companion_computer/pixhawk_rpi.html#raspberry-pi-companion-with-pixhawk