ROS

Required packages

If unable to communicate with devices:

sudo chmod 666 /dev/ttyACM0
sudo chmod 666 /dev/ttyACM1
sudo gpasswd -a $USER dialout

Creating ROS packages

$ ros2 pkg create --build-type ament_cmake --node-name {NODE_NAME} {PKG_NAME} --dependencies rclcpp std_msgs

  // install all required dependencies
$ rosdep install -i --from-path src --rosdistro foxy -y

  // install required dependencies for specific package
$ rosdep install -i --from-path src/{PKG_DIR} --rosdistro foxy -y

Connecting to the Jetson

$ ssh lur@192.168.1.122

Note

You must be connected to the same network as the Jetson.

Building

$ ./scripts/build_lur.sh
$ . install/local_setup.bash

$ ./scripts/build.sh
$ . install/local_setup.bash

$ ./scripts/build_test
$ . install/local_setup.bash

Running

// start mavros
$ ros2 launch launch_files/mavros.yaml

// change mode to stabilize
$ ros2 run mavros mav sys mode -c STABILIZE

// arm drone
$ ros2 run mavros mav safety arm

// starts brain, camera
$ ros2 launch launch_files/main.yaml

// reads 'man_test.txt', publishes to brain
// which then publishes to manual control
$ ros2 launch launch_files/test.yaml