Assuming you are using PX4 v1.15 or earlier with the old rover module, then the MAVLink messages/values you can use in offboard mode are those documented here: Offboard Mode (Generic/All Frames) | PX4 Guide (main)
Those MAVLink messages map to particular uorb topics. The mapping isn’t documented but can be inferred from the names. You can also see what they might be in action by looking at the script you are pointing to. In other words, you can work out what topics to set from the mavlink messages, and see how that works in practice using the script.
@bradstaff Might be able to advise you if you can explain what you mean by “the script isn’t behaving as you would like”.
First you need to check it is actually in the source for the version you are interested in. IF it is, then if itt is not in YAML that means it is compiled into PX4, but not into the XRCE dds client-side libraries. That means you’d have to rebuild PX4 with the Yaml updated to include the topics. This is documented in the ROS2/DDS docs.
After that it would be available to you, but untested for use with ROS (i.e. it should work, but you won’t find docs or anything
There are two versions of Rover in the latest PX4. I assume you’re using the older implementation, since the newer one doesn’t have an offboard mode.
The latest batch of changes added the first iteration for offboard mode. This provides support for the trajectorySetpoint.msg to be used for offboard control.
I tested this with ROS2, but I do not yet have any experience with the other offboard methods.
There is no documentation on this yet on the PX4 user guide because I intend to first align it with Offboard Mode (Generic/All Frames) | PX4 Guide (main) which currently does not apply to the new rover modules.
Hello Christian, greetings from TĂĽrkiye!
I’m trying to design many complex swarm system within a very tight timeframe. I plan to work with PX4, ROS 2 Humble, Nav2, and the Gazebo Harmonic simulation environment (Im not sure if this the most stable environment?).
From what I understand, in offboard mode without GPS, we can only control a rover by sending velocity commands. That means we can’t directly assign target points like A(x,y,z) or B(x,y,z), right? Is my understanding correct?If I’m misunderstanding and you can help me I would really appreciate it.
Hi @bugra_yildirim,
All rover setpoint messages have exposed to DDS in this PR.
If you build PX4 from the main branch, you should be able to directly publish to the rover setpoints through ROS2. This includes: Position (which might be what you’re looking for), Velocity, Attitude, Rate, Throttle and Steering.
Make sure, you also use the main branch of px4_msgs in your ROS2 workspace for this to work.
The Position setpoint takes a target position given in local frame (NED), so i’d imagine that if you have a local position estimate this should probably work (have never tested this myself though, I always worked with a global position estimate provided by GPS so I don’t have any experience with this).