Skip to content

List of important nodes and topics

Nils edited this page May 6, 2019 · 6 revisions

This page is a comprehensive list of the most important packages, nodes and messages of this project.

This is a representation of the current setup (boxes are topics, dashed nodes are external, dotted nodes are abstract):

NOTE: Everything below is probably outdated. Proceed with caution.

Package: autonomous

The "autonomous" package contains all code related to autonomous operation of the car.

Node: autonomous_control

This node takes pid values and translates them into drive commands.

Input:
    /pid_input 
        Desc: Desired velocity and angle
        Type: pid_input
        
Output:
    /input/drive_param/wallfollowing
        Desc: Desired velocity and angle from wallfollowing
        Type: drive_param

Node: wall_following

This node implements an autonomous wall-following algorithm for the car.

Input:
    /racer/laser/scan 
        Desc: Scan of the Lidar
        Type: ???
        
Output:
    /pid_input 
        Desc: Desired velocity and angle
        Type: pid_input

Package: car_control

The "car_control" package relays the drive commands to the physical car.

Node: car_controller

This node takes abstract drive commands and translates them for the physical car/FOCBOX.

Input:
    /set/drive_param 
        Desc: Desired velocity and angle
        Type: drive_param
    /command
        Desc: Has two possible values: 
            "go" for normal operation and 
            "stop" for emergency brake
        Type: string
        
Output:
    /commands/motor/speed 
        Desc: FOCBOX topic for velocity
        Type: Float64
        Unit: ??? (erpm?)
        Range: 500 to 15000
    /commands/motor/brake
        Desc: FOCBOX topic for braking
        Type: Float64
        Unit: ???
        Range: ???
    /commands/servo/position
        Desc: FOCBOX topic for angle
        Type: Float64
        Unit: ??? (unitless?)
        Range: 0 to 1

Node: dms_controller

This node handles the dead man switch.

Input:
    /set/dms
        Desc: Timestamp of dms being held
        Type: Int64
        
Output:
    /command
        Desc: Has two possible values: 
            "go" for normal operation and 
            "stop" for emergency brake
        Type: string

Node: drive_parameters_multiplexer

This node handles the commands from the (currently) three different input methods: keyboard, joystick and wallfollowing algorithm.

Input:
    /input/drive_param/keyboard
        Desc: Desired velocity and angle from keyboard
        Type: drive_param
    /input/drive_param/joystick
        Desc: Desired velocity and angle from joystick
        Type: drive_param
    /input/drive_param/wallfollowing
        Desc: Desired velocity and angle from wallfollowing
        Type: drive_param
        
Output:
    /set/drive_param
        Desc: Desired velocity and angle
        Type: drive_param

Package: drive_msgs

The "drive_msgs" package contains the necessary ROS messages for the F1/10 project.

Message: drive_param

This message describes the velocity and angle that the physical/simulated car should attain. For the velocity, 0 means the car rests and 1 and -1 are the fastest forward and reverse velocities. For the steering angle, 0 means the car drives straight and 1 and -1 are the sharpest turning angles possible (~30°).

velocity:
    Type: Float64
    Unit: relative
    Range: -1 to 1
angle:
    Type: Float64
    Unit: relative
    Range: -1 to 1

Message: pid_input

Same as drive_param?

vel:
    Type: Float64
    Unit: relative
    Range: -1 to 1
error:
    Type: Float64
    Unit: relative
    Range: -1 to 1

Package: external_packages/vesc (external)

The "vesc" package communicates with the FOCBOX.

Node: vesc_driver_node

This node is responsible for controlling the FOCBOX.

Input:
    /commands/motor/speed 
        Desc: FOCBOX topic for velocity
        Type: Float64
        Unit: ??? (rpm?)
        Range: ??? (hard limits here)
    /commands/motor/brake
        Desc: FOCBOX topic for braking
        Type: Float64
        Unit: ???
        Range: ???
    /commands/servo/position
        Desc: FOCBOX topic for angle
        Type: Float64
        Unit: ??? (unitless?)
        Range: 0 to 1

Output:
    ???

Package: simulation/racer_control

The "racer_control" package spawns all necessary controllers for the simulation in Gazebo.

This package contains no important nodes.

Package: simulation/racer_description

The "racer_description" package contains a model of the racing car.

The simulation of the car includes the following topics:

Output:
    /racer/camera1/image_raw
        Desc: Image of the (simulated) camera
        Type: ???
    /racer/laser/scan
        Desc: Output of the LIDAR
        Type: ???
    more?

Package: simulation/racer_world

The "racer_world" package contains launch files for the simulation of the car.

Contains no important nodes.

Package: simulation/vesc_sim

The "vesc_sim" package simulates the Focbox in Gazebo.

Node: vesc_sim_driver

This node simulates the Focbox in Gazebo.

Input:
    /commands/motor/speed 
        Desc: FOCBOX topic for velocity
        Type: Float64
        Unit: ??? (rpm?)
        Range: ??? (hard limits here)
    /commands/motor/brake
        Desc: FOCBOX topic for braking
        Type: Float64
        Unit: ???
        Range: ???
    /commands/servo/position
        Desc: FOCBOX topic for angle
        Type: Float64
        Unit: ??? (unitless?)
        Range: 0 to 1

Output:
    /odom
        Desc: Odometry data
        Type: nav_msgs/Odometry
    /racer/left_wheel_back_velocity_controller/command
        Desc: Velocity of the left back wheel
        Type: Float64
        Unit: ???
    /racer/right_wheel_back_velocity_controller/command
        Desc: Velocity of the right back wheel
        Type: Float64
        Unit: ???
    /racer/left_wheel_front_velocity_controller/command
        Desc: Velocity of the left front wheel
        Type: Float64
        Unit: ???
    /racer/right_wheel_front_velocity_controller/command
        Desc: Velocity of the right front wheel
        Type: Float64
        Unit: ???
    /racer/left_steering_hinge_position_controller/command
        Desc: Angle of the left front wheel
        Type: Float64
        Unit: ???
    /racer/right_steering_hinge_position_controller/command
        Desc: Angle of the right front wheel
        Type: Float64
        Unit: ???

Package: teleoperation

The "teleoperation" package contains code for manual control of the car.

Node: joy (external)

This node converts physical joystick operation into a ROS topic.

Input:
    <physical joystick operation>

Output:
    joy
        Desc: Joystick commands
        Type: sensor_msgs/joy

Node: joystick_controller

This node reads joystick commands and translates them to car commands.

Input:
    joy
        Desc: Joystick commands
        Type: sensor_msgs/joy

Output:
    /input/drive_param/joystick
        Desc: Desired velocity and angle from joystick
        Type: drive_param
    /set/dms
        Desc: Timestamp of dms being held
        Type: Int64

Node: keyboard_controller

This node reads keyboard commands and translates them to car commands.

Input:
    <physical keyboard presses>

Output:
    /input/drive_param/keyboard
        Desc: Desired velocity and angle from keyboard
        Type: drive_param
    /set/dms
        Desc: Timestamp of dms being held
        Type: Int64