Apps & API
The rover modules have been tested and integrated with a subset of the available Apps & API methods. We specifically provide guides for using ROS 2 to interface a companion computer with PX4 via uXRCE-DDS.
Method | 설명 |
---|---|
PX4 ROS 2 Interface (Recommended) | Register a custom mode and publish RoverSetpointTypes. |
ROS 2 Offboard Control | Use the PX4 internal Offboard Mode and publish messages defined in dds_topics.yaml. |
PX4 ROS 2 Interface
We recommend the use of the PX4 ROS 2 Interface Library which allows you to register a custom drive mode and exposes RoverSetpointTypes.
By using these setpoints (instead of the PX4 internal rover setpoints), you are guaranteed to send valid control inputs to your vehicle and the control flags for the setpoints you are using are automatically set for you. Registering a custom drive mode instead of using ROS 2 Offboard Control additionally provides the advantages listed here.
To get familiar with this method, read through the guide for the PX4 ROS 2 Interface Library where we also provide an example app for rover.
ROS 2 Offboard Control
ROS 2 Offboard Control uses the PX4 internal Offboard Mode.
While you can subscribe/publish to all topics specified in dds_topics.yaml, not all rover modules support all of these topics (see Supported Setpoints). Unlike the RoverSetpointTypes exposed through the PX4 ROS 2 Interface, there is no guarantee that the published setpoints lead to a valid control input.
In addition, the correct control mode flags must be set through OffboardControlMode. This requires a deeper understanding of PX4 and the structure of the rover modules. For general information on setting up offboard mode read through Offboard Mode and then consult Supported Setpoints.