Autonomous Navigation

Running autonomous navigation in the 2D simulator
Follow the instructions in the README to compile the  and   executables. In particular, you will need to download/install Eigen, SFML, and ROS2. Don't forget the step  at the end of the ROS2 setup---you will need to do this in every terminal window when you want to run programs that use ROS2 (or add it to your   so that it runs automatically).

A separate terminal window, run. Note that some people have had trouble getting SFML to work on non-Linux machines. If you don't see an SFML window pop up (see below for screenshot) then you might want to try running on a Linux machine if possible. Alternatively, if you can figure out how to get SFML working on a non-Linux machine, please edit this document and tell us how! (Or you can work on developing the 3D simulator, which uses Unity and should have better Windows support.)



In another terminal window, run. You should see another SFML window pop up.



Next, start Mission Control as detailed in the Rover operation procedures guide. This involves opening two more terminals and running  from the client and server subdirectories of our Mission Control repo.

Finally, press 'p' in Mission Control to enable autonomous mode. The rover should start moving in the simulator window, and in the PlanViz window you should see the navigation output. Here are some screenshots of the two SFML windows during execution. Black/gray triangle is the robot, gray polygons are obstacles, red dots are simulated lidar hits, blue dots are simulated AR tags, green triangle is the goal point for the planner, red triangles are the plan, and blue triangle is the lookahead point for the local controller.





Running autonomous navigation in the 3D simulator
The 3D simulator doesn't yet support the necessary API! Please talk to us if you're interested in helping to get this work!



Running autonomous navigation on the real rover
This is similar to running it for the 2D simulator, except that instead of running  on your laptop, you should run   on the rover itself (i.e. the Jetson TX2 computer). See the Rover operation procedures guide for information about how to open an SSH terminal on the rover. You should still run the  executable on your laptop to view the output of the navigation system.

Make sure that the GPS sensor is connected to the rover (via USB). TODO: add picture of GPS sensor.

Right now we are not focusing on obstacle avoidance, so there's no need to mount the lidar sensor.

NOTE: We have not actually tested autonomous navigation very much on the real rover! It might do crazy things! This could be dangerous! Exercise caution when doing real-world tests.

Contributing to the code for autonomous navigation
Much of our autonomous navigation code is in the  submodule of the Resurgence repo. (This is because both the simulator and the SLAM solver (which handles localization and mapping) are adapted from a separate project that I (Nathan) was working on a while ago.) Other code is in.