- DJI F550
- Nvidia Jetson Xavier NX
- Intel Realsense T265
- OptiTrack (Motion Capture System)
- Use
tf_mocap
instead oftf_rs
- Use
- Change rostopic from
/camera/odom/sample
to/mavros/vision_pose/pose
roslaunch tf_rs tf_rs.launch
- Estimate precise local position
/mavros/local_position/pose
in PX4- You can also use
/mavros/local_position/odom
- You can also use
- Set symbolic link (optional)
- It will link
/dev/ttyUSB0
to/dev/ttyPixhawk
- https://github.com/finani/WeeBee/tree/master/tty_symlink
- You can check tty using
ls /dev/tty*
- The tty name depends on the connection order. If you connect an Arduino first and then PX4, the Arduino is set as ttyUSB0 and the PX4 is set as ttyUSB1. The tty name changes frequently because you can not connect the devices sequentially each time. So, you need to set up a symbolic link for a stable system. (Many devices use FTDI chip and they use a serial communication.)
- You can check tty using
- It will link
- Set PX4 Telemetry parameters
- https://dev.px4.io/master/en/companion_computer/pixhawk_companion.html
- Set
MAV_1_CONFIG
toTelem2
,MAV_1_MODE
toOnboard
andSER_TEL2_BAUD
to 921600 - Reboot PX4
- Edit mavros px4 launch
sudo gedit /opt/ros/melodic/share/mavros/launch/px4.launch
- Set
fcu_url
to/dev/ttyPixhawk:921600
<arg name="fcu_url" default="/dev/ttyPixhawk:921600"/>
- address: /dev/ttyPixhawk (or /dev/ttyUSB0)
- baudrate: 921600 bps
- Set PX4 Vision parameters
- https://docs.px4.io/master/en/computer_vision/visual_inertial_odometry.html
- Set
EKF2_AID_MASK
to24
(vision_position_fusion, vision_yaw_fusion) - Set
EKF2_HGT_MODE
to3: vision
- Reboot PX4
- Run mavros
- It will connect to PX4
roslaunch mavros px4.launch
- Run T265
- It will start to estimate local position
roslaunch realsense2_camera rs_t265.launch
- Rename rostopic
- It will link the T265 topic(data) to mavros(PX4)
roslaunch tf_rs tf_rs.launch
- Send a command (optional)
- It will send a command to move the drone
roslaunch offboard_drone offboard.launch
- Make a command (optional)
- It is a mission planner
- It will make a command to control the drone
roslaunch ??? ???.launch
- T265 odometry (
/camera/odom/sample
)- Check the value and the direction
- It is required only once at the first time
- Mavros local position (
/mavros/local_position/pose
or/mavros/local_position/odom
)- Check the value and the direction
- It is required only once at the first time
- Mavros state from
offboard.launch
- Check the data (connected, armed, guided, flight_mode, cur_position)
- It is required every time
- Command output from
offboard.launch
- Check the command (usually velocity) output
- It is required when running the new algorithm
- Fly safely~