px4ws

1 Overview

CI status Debian package
Build Status Latest version of 'px4ws' @ Cloudsmith

Multi-drone PX4 SITL setup using Gazebo and ROS2. Generally follows https://docs.px4.io/main/en/sim_gazebo_gz/, but uses custom bringup scripts which serve as a showcase of https://github.com/asherikov/cdinit.

Workspace documentation is at http://www.sherikov.net/px4ws/.

1.1 Packages

PX4-Autopilot/PX4-Autopilot                         main             https://github.com/asherikov/PX4-Autopilot.git
cdinit                                              master           https://github.com/asherikov/cdinit.git
dds_agent/Micro-XRCE-DDS-Agent/Micro-XRCE-DDS-Agent v2.4.3           https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
dds_agent/spdlog                                    v1.9.2           https://github.com/gabime/spdlog.git
px4_msgs                                            as_disable_tests https://github.com/asherikov/px4_msgs.git

PX4-Autopilot and Micro-XRCE-DDS-Agent are build using proxy packages in order to apply a few cmake tweaks

2 Usage

2.1 Building

2.2 Binary package

2.3 Running

2.4 cdinit services

All components are started using dinit service files located in px4sitl/cdinit_services/, see https://github.com/davmac314/dinit, https://github.com/asherikov/cdinit provides a cmake wrapper for dinit and helper scripts. Shell scripts are primarily used to setup environment and working directories.

2.4.1 Example

# dummy "boot" service
[[+]     ] cdinit_main
# Gazebo gui
[[+]     ] px4sitl_gz_gui (pid: XXX)
# PX4 instances, number after @ symbol is a corresponding system id
[[+]     ] px4sitl_px4@0 (pid: XXX)
[[+]     ] px4sitl_px4@1 (pid: XXX)
# logging services, cdinit_log helper adds timestamps
[{+}     ] cdinit_log@px4sitl_dds_agent (pid: XXX)
[{+}     ] cdinit_log@px4sitl_gz_clock (pid: XXX)
[{+}     ] cdinit_log@px4sitl_gz_gui (pid: XXX)
[{+}     ] cdinit_log@px4sitl_gz_headless (pid: XXX)
[{+}     ] cdinit_log@px4sitl_gz_wait (pid: XXX)
[{+}     ] cdinit_log@px4sitl_px4@0 (pid: XXX)
[{+}     ] cdinit_log@px4sitl_px4@1 (pid: XXX)
# Micro-XRCE-DDS-Agent bridging PX4 and ros2
[{+}     ] px4sitl_dds_agent (pid: XXX)
# Gazebo -> ROS2 simulation clock bridge
[{+}     ] px4sitl_gz_clock (pid: XXX)
# Gazebo simulation core
[{+}     ] px4sitl_gz_headless (pid: XXX)
# Helper service which waits for Gazebo to start
[{+}     ] px4sitl_gz_wait
# Dummy "master" service
[{+}     ] px4sitl_ros

3 Troubleshooting

4 TODO

5 Packages

5.1 Dependency graph

5.2 Doxygen documentation

Package Dependencies Dependents
cdinit graph graph
cdinit_examples graph graph
cdinit_manager graph graph
dds_agent graph graph
px4_msgs graph graph
px4sitl graph graph
spdlog graph graph

Total number of packages: 7

5.3 Workspace status

tags/0.1.2-0-g3a947a9
WSH: >>> status: git sources ---
Flags: H - version hash mismatch, M - uncommited changes
name                                                version          actual version                    HM repository
----                                                -------          --------------                    -- ----------
PX4-Autopilot/PX4-Autopilot                         main             heads/main-0-g2e586c4                https://github.com/asherikov/PX4-Autopilot.git
cdinit                                              master           heads/master-0-g3bb0858              https://github.com/asherikov/cdinit.git
dds_agent/Micro-XRCE-DDS-Agent/Micro-XRCE-DDS-Agent v2.4.3           tags/v2.4.3-0-g7362281               https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
dds_agent/spdlog                                    v1.9.2           tags/v1.9.2-0-geb32206               https://github.com/gabime/spdlog.git
px4_msgs                                            as_disable_tests heads/as_disable_tests-0-g1398c8b    https://github.com/asherikov/px4_msgs.git

WSH:  <<< status: git sources ---

6 Useful links

6.1 ROS1

6.2 ROS2