Full Development Bringup
Full Development Environment Startup
Section titled “Full Development Environment Startup”This is a tutorial and explanation on how to bringup the development environment from scratch.
Set up the environment:
cd ~/ros2_ws/src/mrover_drone/source /opt/ros/humble/setup.zshsource install/setup.zshRun the drone_sim launch file:
ros2 launch drone_sim px4_sitl_gz_ros2.launch.pyIf testing base-station code, connect mavros:
This reflects how the groundstation code will interact with PX4. Fcu_url is the address of the flight controller. Because we are running the software simulator locally, its the loopback address (127.0.0.1) at the default port of 14557.
cd ~/ros2_ws/src/mrover_drone/source /opt/ros/humble/setup.zshros2 launch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"If you are running with the actual drone, run ifconfig to find the radio link’s remote address. Then run:
ros2 launch mavros px4.launch fcu_url:="udp://localhost:14555@35.3.235.213:14550"(assuming 35.3.235.213 is the remote address)
Checking for issues
Section titled “Checking for issues”To make sure everything is working as expected, run:
ros2 topic listYou should see a series of topics prepended with ‘mavros’ and some with ‘fmu’.
Now, side by side, run:
ros2 topic echo /mavros/global_position/globalros2 topic echo /fmu/out/vehicle_global_positionYou should see two different data formats, but if you check the latitude and longitude they should be the same.