Coder Social home page Coder Social logo

f1tenth_system's Introduction

f1tenth_system

Drivers onboard f1tenth race cars. This branch is under development for migration to ROS2. See the documentation of F1TENTH on how to get started.

Deadman's switch

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.

Topics

Topics that the driver stack subscribe to

  • /drive: Topic for autonomous navigation, uses AckermannDriveStamped messages.

Sensor topics published by the driver stack

  • /scan: Topic for LaserScan messages.
  • /odom: Topic for Odometry messages.
  • /sensors/imu/raw: Topic for Imu messages.
  • /sensors/core: Topic for telemetry data from the VESC

External Dependencies

  1. ackermann_msgs https://index.ros.org/r/ackermann_msgs/#foxy.
  2. urg_node https://index.ros.org/p/urg_node/#foxy. This is the driver for Hokuyo LiDARs.
  3. joy https://index.ros.org/p/joy/#foxy. This is the driver for joysticks in ROS 2.
  4. teleop_tools https://index.ros.org/p/teleop_tools/#foxy. This is the package for teleop with joysticks in ROS 2.
  5. vesc GitHub - f1tenth/vesc at ros2. This is the driver for VESCs in ROS 2.
  6. ackermann_mux GitHub - f1tenth/ackermann_mux: Twist multiplexer. This is a package for multiplexing ackermann messages in ROS 2.

Package in this repo

  1. f1tenth_stack: maintains the bringup launch and all parameter files

Nodes launched in bringup

  1. joy
  2. joy_teleop
  3. ackermann_to_vesc_node
  4. vesc_to_odom_node
  5. vesc_driver_node
  6. urg_node
  7. ackermann_mux

Parameters and topics for dependencies

vesc_driver

  1. 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
  2. Publishes to:
    • sensors/core
    • sensors/servo_position_command
    • sensors/imu
    • sensors/imu/raw
  3. Subscribes to:
    • commands/motor/duty_cycle
    • commands/motor/current
    • commands/motor/brake
    • commands/motor/speed
    • commands/motor/position
    • commands/servo/position

ackermann_to_vesc

  1. Parameters:
    • speed_to_erpm_gain
    • speed_to_erpm_offset
    • steering_angle_to_servo_gain
    • steering_angle_to_servo_offset
  2. Publishes to:
    • ackermann_cmd
  3. Subscribes to:
    • commands/motor/speed
    • commands/servo/position

vesc_to_odom

  1. 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
  2. Publishes to:
    • odom
  3. Subscribes to:
    • sensors/core
    • sensors/servo_position_command

throttle_interpolator

  1. 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
  2. Publishes to:
    • topic described in rpm_output_topic
    • topic described in servo_output_topic
  3. Subscribes to:
    • topic described in rpm_input_topic
    • topic described in servo_input_topic

f1tenth_system's People

Contributors

hzheng40 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

f1tenth_system's Issues

Licence adding

Hi guys, my lab would be planning on open-sourcing a project that includes parts of this code. We found that there is no licence attached to this repo, so I wanted to ask if this is done on purpose. If not, would it be possible to use an MIT/public-domain licence etc. here?
Thanks!

2021 Target Features

SW Items

  • Integrate with Autoware.Auto to control an existing F1TENTH vehicle
  • Adding a SLAM algorithm to the localization pipeline
  • Add support for stereo-vision-based localization method (Target HW examples: ZED2, RealSense D435i, etc.)
  • Add support for mono-vision cameras (especially image_pipeline improvements)
  • Consider how to implement multi-car racing

HW Items

  • Consider making custom PCB which integrates speed control and power distribution
  • Consider "higher-level" version of custom PCB which includes additional sensors and a microcontroller

Reverse SERVO direction

I am trying to get joy_teleop working. What will fix it if servo (steering) direction is reversed (left steers to the right and right joy steers it to the left) ?. I am trying to find that point in the code where I can reverse the command. Any help is appreciated.

Steering issue PS4 controller (mapping)

I have the same problem as issue #11 with a PS4 controller but can't get the mapping right.
If i change the mapping of the axis in the joy_teleop.yaml file the buttons on the controller still have the same function. Button L1 is the deathmans switch and if you press it the car steers to the left. If you press button L1 and L2 the car steers to te right. The left joystick works fine for speed.
The strange thing is that if I remap the drive speed axis, the left joystick is still for speed.
It looks like the program doesn't do anything with the changes that i make to the file.
After making changes to the file i relaunch teleop again.

Does anyone know what can be wrong or what i am possibly doing wrong?

Below is the config file:

joy:
ros__parameters:
# device_name: /dev/input/joypad-f710
device_id: 0
deadzone: 0.01
autorepeat_rate: 20.0
coalesce_interval: 0.01

joy_teleop:
ros__parameters:
default:
type: topic
interface_type: ackermann_msgs/msg/AckermannDriveStamped
topic_name: teleop
axis_mappings:
drive-speed:
axis: 1
scale: 0.0
offset: 0.0
drive-steering_angle:
axis: 2
scale: 0.0
offset: 0.0

human_control:
  type: topic
  interface_type: ackermann_msgs/msg/AckermannDriveStamped
  topic_name: teleop
  deadman_buttons: [4]
  axis_mappings:
    drive-speed:
      axis: 1
      scale: 5.0
      offset: 0.0
    drive-steering_angle:
      axis: 2
      scale: 0.34
      offset: 0.0

autonomous_control:
  type: topic
  interface_type: std_msgs/msg/Int8
  topic_name: /dev/null
  deadman_buttons: [5]
  message_value:
    data:
      value: 0

Steering Issue on Manual Control Mode

I have a question about the steering control in Manual Control Mode. I am using a PS4 controller, but it is not from DualShock. I can mapping part correctly but on, but once I press the LB button, the steering will move toward the left, and I can't use the right joystick to control the steering. The left joystick used for speed works fine.

I thought it was a configuration issue and tried to use the same joy_teleop config as the car works on ROS 1. I need help with it. Would you happen to have any insight on how I can fix this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.