Drivers onboard f1tenth race cars. This branch is under development for migration to ROS2. See the documentation of F1TENTH on how to get started.
If you clone this repository, make sure to clone the submodules as well. You can do this by running:
git submodule update --init --recursive --remoteThis will ensure you have all the submodules cloned and updated to the configured branches.
On Logitech F-710 joysticks, the LB button is the deadman's switch for teleop, and the RB button is the deadman's switch for navigation. You can also remap buttons. See how on the readthedocs documentation.
Note that sick_scan_xd does not have an apt package for ROS2 foxy, you can try installing from source. Follow these steps to install sick_scan_xd on Linux for ROS 2 Humble:
sudo apt update
sudo apt-get install ros-humble-sick-scan-xd
Warning: Make sure to use the sick_tim_5xx.launch file located in the f1tenth_stack package's launch directory:
<f1tenth_stack>/launch/sick_tim_5xx.launch
Bring up with ros2 launch f1tenth_stack sick_bringup_launch.py. This file is an updated version of the original sick_tim_5xx.launch file that changes the "frame_id" to "laser" and "tf_base_frame_id" to "base_link", which is compatible with the slam_toolbox and particle filter. You will still need to set the IP address of the lidar in the launch file.
Bring up with ros2 launch f1tenth_stack sick_bringup_launch.py
See the documentation of F1TENTH on how to get started.
The lidar is delivered with a standard IP address. There are two ways to read or change the IP address:
-
Using a Windows Computer : Install SICK SOPAS ET and follow the instructions in the sick_scan_xd package.
-
Using a Linux Computer : You can scan the network for the lidar IP address using the following command:
nmap -snIf you have a SICK lidar connected to the network, you will see the IP address of the lidar in the output.
/drive: Topic for autonomous navigation, usesAckermannDriveStampedmessages.
/scan: Topic forLaserScanmessages./odom: Topic forOdometrymessages./sensors/imu/raw: Topic forImumessages./sensors/core: Topic for telemetry data from the VESC
- ackermann_msgs https://index.ros.org/r/ackermann_msgs/#humble.
- urg_node https://index.ros.org/p/urg_node/#humble. This is the driver for Hokuyo LiDARs.
- joy https://index.ros.org/p/joy/#humble. This is the driver for joysticks in ROS 2.
- teleop_tools https://index.ros.org/p/teleop_tools/#humble. This is the package for teleop with joysticks in ROS 2.
- vesc GitHub - f1tenth/vesc at ros2. This is the driver for VESCs in ROS 2.
- ackermann_mux GitHub - f1tenth/ackermann_mux: Twist multiplexer. This is a package for multiplexing ackermann messages in ROS 2.
- f1tenth_stack: maintains the bringup launch and all parameter files
- joy
- joy_teleop
- ackermann_to_vesc_node
- vesc_to_odom_node
- vesc_driver_node
- urg_node
- ackermann_mux
- Parameters:
- duty_cycle_min, duty_cycle_max
- current_min, current_max
- brake_min, brake_max
- speed_min, speed_max
- position_min, position_max
- servo_min, servo_max
- Publishes to:
- sensors/core
- sensors/servo_position_command
- sensors/imu
- sensors/imu/raw
- Subscribes to:
- commands/motor/duty_cycle
- commands/motor/current
- commands/motor/brake
- commands/motor/speed
- commands/motor/position
- commands/servo/position
- Parameters:
- speed_to_erpm_gain
- speed_to_erpm_offset
- steering_angle_to_servo_gain
- steering_angle_to_servo_offset
- Publishes to:
- ackermann_cmd
- Subscribes to:
- commands/motor/speed
- commands/servo/position
- Parameters:
- odom_frame
- base_frame
- use_servo_cmd_to_calc_angular_velocity
- speed_to_erpm_gain
- speed_to_erpm_offset
- steering_angle_to_servo_gain
- steering_angle_to_servo_offset
- wheelbase
- publish_tf
- Publishes to:
- odom
- Subscribes to:
- sensors/core
- sensors/servo_position_command
- Parameters:
- rpm_input_topic
- rpm_output_topic
- servo_input_topic
- servo_output_topic
- max_acceleration
- speed_max
- speed_min
- throttle_smoother_rate
- speed_to_erpm_gain
- max_servo_speed
- steering_angle_to_servo_gain
- servo_smoother_rate
- servo_max
- servo_min
- steering_angle_to_servo_offset
- Publishes to:
- topic described in rpm_output_topic
- topic described in servo_output_topic
- Subscribes to:
- topic described in rpm_input_topic
- topic described in servo_input_topic