sudo apt update && rosdep update
sudo apt install ros-$ROS_DISTRO-diagnostic-updater
rosdep install --from-paths src --ignore-src -y
colcon build
- Get vensor id and product id:
lsusb - Crate a rules file:
sudo nano /etc/udev/rules.d/99-f1tenth-usb.rules
# Arduino MKR Zero for micro-ROS
SUBSYSTEM=="tty", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", MODE="0666", SYMLINK+="sensors/micro_ros"
# VESC Motor Controller
SUBSYSTEM=="tty", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", MODE="0666", SYMLINK+="sensors/vesc"
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo apt install ros-$ROS_DISTRO-foxglove-bridge
Note
Distributions older than Humble: sudo apt install ros-foxy-rosbridge-server
- Download micro-ROS agent packages:
ros2 run micro_ros_setup create_agent_ws.sh - Build step:
ros2 run micro_ros_setup build_agent.sh source install/local_setup.bash
-
ros2 launch f1tenth_stack bringup_launch.py
-
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/sensors/micro_ros
-
- Foxglove bridge:
ros2 launch foxglove_bridge foxglove_bridge_launch.xml - ROS bridge:
ros2 launch rosbridge_server rosbridge_websocket_launch.xml
- Foxglove bridge:
-
- MCAP:
ros2 bag record -s mcap -o <file_name> -a - .db3:
ros2 bag record -o <file_name> -a
- MCAP:
-
- Adjust
steering_angle_to_servo_gain
in/F110th/src/f1tenth_system/f1tenth_stack/config/vesc.yaml
-
- Adjust
speed_minandspeed_max
in/F110th/src/f1tenth_system/f1tenth_stack/config/vesc.yaml
- Adjust
-
- Change the sign of this expression:
(-state->state.speed - speed_to_erpm_offset_)
in/F110th/src/vesc/vesc_ackermann/src/vesc_to_odom.cpp
- Change the sign of this expression:
-
Now we have to determine the
speed_to_erpm_gainand Joy teleop scale
in/F110th/src/f1tenth_system/f1tenth_stack/config/vesc.yamland/F110th/src/f1tenth_system/f1tenth_stack/config/joy_teleop.yaml(Line 33), respectively.By using this equation:
(speed_to_erpm_gain + x) * (scale + y) = MAX ERPM
- Adjust
Note
MAX ERPM is the maximum ERPM value that you want the car can goes.
It can be any number that you want or even MAX ERPM = speed_max, but should not higher than speed_max
Use this website to help you plot the graph and pick the right value