Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.75 KB

File metadata and controls

58 lines (38 loc) · 1.75 KB

Teleoperation

This packages offers uses PX4 custom modes and executor to teleop a drone.

Usage

Launch gz walls world, you'll have to navigate inside narrow passages now.

First start the container, then run

python3 /home/ubuntu/PX4-gazebo-models/simulation-gazebo --model_store /home/ubuntu/PX4-gazebo-models/ --world walls

Spawn model and attach PX4 SITL

PX4_GZ_STANDALONE=1 PX4_SYS_AUTOSTART=4013 PX4_PARAM_UXRCE_DDS_SYNCT=0 /home/ubuntu/px4_sitl/bin/px4 -w /home/ubuntu/px4_sitl/romfs

Here we used PX4_SYS_AUTOSTART=4013 which set the Gazebo model to x500_lidar_2d. Don't forget to start QGC too.

When the simulation is running you can see the GZ topics:

gz topic -l

You can now launch the common launchfile

ros2 launch px4_roscon_25 common.launch.py

and finally the teleop launchfile and the keyboard_monitor node.

ros2 launch teleop teleop.launch.py
ros2 run teleop_twist_rpyt_keyboard teleop_twist_rpyt_keyboard

Just like in the Custom Mode demo, the teleop one requires you to manually activate it and arm the drone! Make sure you launch the maze in Foxglove, more details see Foxglove Instructions

Your output should look like this: foxglove example

Exercise

Navigate the drone to the target in Foxglove using teleoperation. Do not use the Gazebo simulation, rely solely on the LiDAR (laser scan) data for guidance. Hint: Observe and record a few key waypoints along the path, these will be useful for a subsequent exercise. https://docs.px4.io/main/en/msg_docs/VehicleLocalPosition