Getting MOCAP data into PX4
- Please refer to the MOCAP-ROS interface tutorial to get mocap data into ROS on your ODROID, by running vrpn_client_rosnode
- You will need to run MAVROS node in order to connect ODROID to the flight controller.roslaunch mavros px4.launch fcu_url:=/dev/ttyUSB0:921600 gcs_url:=udp://@192.168.1.102:14550ttyUSB0should match the serial port ID in your ODROID.gcs_url:=udp://@192.168.1.102:14550this is used to allow you to receive data to QGroundControl on your machine (that has to be connected to the same WiFi router). Adjust the IP to match your PC IP, that runs QGC.
- relay the mocap data to the flight controller - If you are using LPE - rosrun topic_tools relay /vrpn_client_node/<rigid_body_name>/pose /mavros/mocap/pose- Check in QGC that you get - mocap init ....message which means mocap data is received by Pixhawk.
- if you use EKF2 - rosrun topic_tools relay /vrpn_client_node/<rigid_body_name>/pose /mavros/vision_pose/pose
 
Now you are ready to use position hold/offboard modes.
It is very important that you align the forward direction of your drone (robot) with the x-axis of your mocap when you first define a rigid body. You can find the x-axis direction in the mocap software, Motive.
If you use the Ubuntu minimal image that is provided above, you will need to adjust the WiFi connection in order to connect to your WiFi router
- connect 5Ghz WiFi module to ODROID XU4. Open a terminal in ODROID and type
 in order to know your WiFi module ID number. It should be something likeifconfigwlan0.
- edit the interfacesfile to provide the correct WiFi module ID you got above, and use your WiFi network name and password
 After you finish editing, use CTRL+x to try to exut. It will ask you if you want to save. Hitnano /etc/network/interfacesYkey and thenENTER.
If it gives you error like  permission denied use,
sudo nano /etc/network/interfaces
DONE!