0. Introduction and Setup Environment

0. Introduction and Setup Environment

Weihang Guo

This series of blogs are based on F1tenth

F1TENTH is a fun, fast-paced, and flexible course that teaches the foundations of Autonomy:

  • Perception
  • Planning
  • Control
  • Analytic skills to recognize and reason about situations with moral content in the design of autonomous systems
  • This course is an integration of the concepts above and is not intended to be a beginner course in any of the above subjects. As of right now, the contents on this website are best suited for the graduate-level if not at the very least an undergraduate senior-level course.

ROS

You need to get familiar with ROS before starting. I used ROS melodic with Ubuntu 18.04 in the rest of the blog. My suggestion is read though 1-10 and 12. I realize all the algorithms in python.

image-20220424025349261


F1tenth Simulator

Install and run f1tenth_simulator on host computer

  • Go to https://github.com/f1tenth/f1tenth_simulator and follow README.md for installation instructions;

  • Summary of installation steps:

    1. Update ROS dependencies:

    $sudo apt-get install ros-melodic-tf2-geometry-msgs ros-melodic-ackermann-msgs ros-melodic-joy ros-melodicmap-server

    1. Create a catkin workspace with the name you want (``f1tenth_wsfor example) and under the workspace, create asrc` folder
    2. Git clone the f1tenth_simulator.git into the xxx_ws/src/ subfolder of the workspace
    3. Run catkin_make to build the simulator
    4. Run roslaunch to launch the simulator
      1. In the rviz window, add /map topic and /scan topic

Run the simulator

Use commandroslaunch f1tenth_simulator simulator.launch to launch the simulator.

image-20220424030946150

Press keys in the main simulator terminal which displays the status. Manually toggle driver modes

  • B - AEB enable/disable
  • J - joystick on/off
  • K - keyboard drive on/off
  • R - random walk on/off
  • N - Navigation on/off $\mathrm{K}$ or $\mathrm{J}$ can be combined with other modes Keyboard drive:
  • W - forward
  • S - backward
  • A - left turn
  • D - right turn