run.sh Cmds. and Args. - JOCIIIII/PX4-PILS-Runner GitHub Wiki

1. Basic Usage

scripts/run.sh <type> <argument(s)>
  • scripts/run.sh is a script which controls deployment, run, kill of PX4-SITL containers.
  • The script can control independent container one by one and can control federated containers at once.
  • This feature uses bash and profile feature of docker compose.

2. Commands: type

No. Type Definition Compose Services Misc.
1 gazebo-classic-sitl Deploy PX4 - Gazebo-Classic SITL simulation Containers px4-env
gz-sim
ros2-env
qgc-app
SITL Simulation
2 gazebo-classic-airsim-sitl Deploy PX4 - Gazebo-Classic - AirSim SITL simulation Containers px4-env
gz-sim-airsim
airsim-binary
ros2-env-airsim
qgc-app
SITL Simulation
3 px4 Deploy PX4-Autopilot Container px4-env Only deploy one container
4 gazebo-classic Deploy Gazebo-Classic Container gz-sim Only deploy one container
5 airsim Deploy Airsim Container airsim-binary Only deploy one container
6 ros2 Deploy ROS2 Container ros2-env Only deploy one container

3. Arguments: gazebo-classic-sitl

scripts/run.sh gazebo-classic-sitl <argument(s)>
  • The argument is related to the PX4 - Gazebo-Classic SITL simulation.
  • You can selectively set specific containers to debug mode.
  • Examples:
    • Set only QGroundControl in debug mode: scripts/run.sh gazebo-classic-sitl debug qgc
    • Set PX4-Autopilot and RSO2 in debug mode: scripts/run.sh gazebo-classic-sitl debug px4 ros2
No. Argument Definition Misc.
1 run Run PX4 - Gazebo-Classic SITL simulation Containers -
2 debug Run PX4 - Gazebo-Classic SITL simulation Containers in debug mdoe Available second argument(s):
px4
gazebo-classic
ros2
qgc
3 stop Remove deployed PX4 - Gazebo-Classic SITL simulation Containers -

4. Arguments: gazebo-classic-airsim-sitl

scripts/run.sh gazebo-classic-airsim-sitl <argument(s)>
  • The argument is related to the PX4 - Gazebo-Classic - AirSim SITL Simulation.
  • You can selectively set specific containers to debug mode.
  • Examples:
    • Set only QGroundControl in debug mode: scripts/run.sh gazebo-classic-airsim-sitl debug qgc
    • Set PX4-Autopilot and RSO2 in debug mode: scripts/run.sh gazebo-classic-airsim-sitl debug px4 ros2
No. Argument Definition Misc.
1 run Run PX4 - Gazebo-Classic - AirSim SITL Containers -
2 debug Run PX4 - Gazebo-Classic - AirSIm SITL Containers in debug mdoe Available second argument(s):
px4
gazebo-classic
airsim
ros2
qgc
3 stop Remove deployed PX4 - Gazebo-Classic - AirSim SITL Containers -

5. Arguments: px4

scripts/run.sh px4 <argument(s)>
  • The argument is related to the PX4-Autopilot.
  • You can do source control of PX4-Autoilot codes and can also develop PX4-Autopilot related components.
  • You can also perform PX4 - Gazebo-Classic SITL simulation in the container.
    • PX4 - Gazebo-Classic SITL simulation perfomred in this container runs in "attached" mode.
    • That is, PX4-Autopilot and Gazebo-Classic runs simulatenouslt in one container unlike the case of type gazebo-classic-sitl.
No. Argument Definition Misc.
1 debug Run PX4-Autopilot container in debug mode sleep infinity
2 stop Remove PX4-Autopilot container -
3 clone Clone PX4-Autopilot from the repository Clones v1.14.3 by default
4 build Build PX4-Autopilot with Gazebo-Classic SITL simulation plugins make px4_sitl gazebo-classic (Build only)
5 clean Clean PX4-Autopilot builds make distclean
6 sitl-gazebo-classic-standalone Run PX4 - Gazebo-Classic - SITL simulation make px4_sitl gazebo-classic

6. Arguments: gazebo-classic

scripts/run.sh gazebo-classic <argument(s)>
  • The argument is related to the Gazebo-Classic.
  • You can develop Gazebo-Classic worlds and .sdf models in this continaer.
  • You can also run Gazebo-Classic part of the PX4-Autopilot - Gazebo SITL simulation separetely.
No. Argument Definition Misc.
1 debug Run Gazebo-Classic container in debug mode sleep infinity
2 stop Remove deployed Gazebo-Classic container -
3 sitl-px4 Run Gazebo-Classic container in Gazebo-Classic part of the PX4 SITL simulation sitl_run.sh (modified)

7. Arguments: airsim

scripts/run.sh airsim <argument(s)>
  • The argument is related to the AirSim.
  • You can test AirSim Unreal binaries and develop AirSim API-related codes in this container.
  • airsim continaer supports run of custom script placed at AirSim container workspace.
    • For example, if you place your customized script test.sh under scripts directory of AirSim container workspace...
      • AirSim container workspace default: ~/Documents/A4VAI-SITL/AirSim
      • Command: scripts/run.sh airsim test.sh
No. Argument Definition Misc.
1 debug Run AirSim container in debug mode sleep infinity
2 stop Remove deployed AirSim container -
3 auto Automatically run AirSim Unreal binary placed at AirSim container workspace Name of the Unreal binary directory must be binary
4 *.sh Run custom script placed at scripts of AirSim container workspace The script must run in bash ad must be executable.

8. Arguments: ros2

scripts/run.sh ros2 <argument(s)>
  • The argument is related to the ROS2 Galactic.
  • You can build ROS2 packages and receive ROS2 topics using this container.
  • You can build packages placed under all ROS2 workspaces or packages placed under specific ROS2 workspace(s).
    • For example, if you build ROS2 packages placed under ROS2 workspace ros_ws_1 and ros_ws_3 at ROS2 container workspace...
      • ROS2 container workspace default: ~/Documents/A4VAI-SITL/ROS2
      • Command: scripts/run.sh ros2 build ros_ws_1 ros_ws_3
  • ros2 continaer supports run of custom script placed at ROS2 container workspace.
    • For example, if you place your customized script test.sh under scripts directory of ROS2 container workspace...
      • Command: scripts/run.sh ros2 test.sh
No. Argument Definition Misc.
1 debug Run ROS2 container in debug mode sleep infinity
2 stop Remove deployed ROS2 container -
3 build Build ROS2 packages placed under ROS2 workspace(s) Available second argument(s):
target ros2 workspaces to perform build(s)
4 *.sh Run custom script placed at scripts of ROS2 container workspace The script must run in bash ad must be executable.

9. Arguments: qgc

scripts/run.sh qgc <argument(s)>
  • The argument is related to the QGroundControl.
  • You can run packaged QGroundControl in this container.
No. Argument Definition Misc.
1 debug Run QGroundControl container in debug mode sleep infinity
2 stop Remove deployed QGroundControl container -
3 run Run QGroundControl Name of the Unreal binary directory must be binary
⚠️ **GitHub.com Fallback** ⚠️