px4_ros_com icon indicating copy to clipboard operation
px4_ros_com copied to clipboard

Simple offboard movement

Open olliglorioso opened this issue 8 months ago • 0 comments

Here is a Python script in src/examples/offboard_py/maneuver.py that performs two rounds of movements with different speeds (0.5 and 0.2, not m/s). The script is tested, and it works with any starting position/height:

  • Go to height 8m
  • Go to height 6m and stay in 6m
  • Go to x + 4m
  • Go back
  • Go to y + 4m
  • Go back
  • Rotate 360
  • Rotate back

Relevant files for this commit is

  • src/examples/offboard_py/maneuver.py
  • CMakeLists.txt (adds the script to the Python package)

How will we run this (add documentation later) assuming the bridge is running:

cd xxxx/px4_ros_com
ros2 run px4_ros_com offboard_control # start offboard node
ros2 bag record /fmu/out/vehicle_local_position
ros2 run px4_ros_com maneuver.py # start the script

olliglorioso avatar Mar 14 '25 10:03 olliglorioso