Skip to content

New Robot: Install and setup

XuRobotics edited this page Feb 16, 2022 · 30 revisions

Setup the ground station:

On the ground station (a PC you use to send commands, waypoints, etc., to robot), set up the "client" module, you can either:

Build from source

Using docker

Setup the robot:

Building and installing the autonomy stack:

Build from source

Using docker

Building additional packages

cd catkin_ws/src/kr_autonomous_flight
vcs import < external_real_robot.yaml
vcs pull
cd ../..
  1. Build your code again
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build

Important parameter files you should modify according to your purpose:

catkin_ws/src/kr_autonomous_flight/autonomy_core/control/control_launch/config/trackers_mp.yaml

catkin_ws/src/kr_autonomous_flight/autonomy_core/map_plan/map_plan_launch/config/mapper.yaml

Communication and ROS master setup:

Set up the robot as the ROS master, this is very important if your robot is going to lost communication with the ground station at some point.

Set up the communication without a PicoStation: the robot's wifi card needs to be configured as an access point (sending out a hotspot), and connect your ground station to that network. If you do it the other way around, once the communication is lost, the ROS master will be killed.

Set up the communication using a PicoStation: this document should be helpful.

Launch the experiment:

ssh into your robot's onboard computer, start a ROS master there.

On the robot side, execute the following command:

roslaunch real_experiment_launch full_autonomy.launch

On the ground station side, execute the following command:

roslaunch client_launch client.launch

Then, click the commands and send waypoints using the client rqt GUI, similar to the example shown in Gazebo instructions.

Click motors on after the robot gets commands (i.e., when the commands in rqt GUI window become non-zero). Wait for several seconds, click take off in rqt GUI, and you should see the UAV take off.

(Troubleshooting)If the robot does not behave as expected (take off, go to waypoints, etc.), it might be because of the packet loss in communication, and you should try clicking again on the rqt GUI.

(Troubleshooting) If the robot does not take off. You don't have to relaunch. Instead, you can try clicking the rqt GUI again in the following order: motors off -> motors on -> take off If the robot still does not take off, kill the ROS master and relaunch.

Clone this wiki locally