Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
car_keys.main Namespace Reference

Classes

class  PublishThread
 Thread to publish control commands to the robot. More...
 

Functions

 get_key (settings, timeout)
 Get a single key from the user.
 
 print_status (acceleration, steering)
 Print current status without clearing the screen.
 
 create_bar (value, min_val, max_val, length)
 Create a visual bar representation of a value.
 
 main ()
 Main function to control the pacsim robot using the keyboard.
 

Variables

 lateral_command_msg = StampedScalar()
 
 longitudinal_command_msg = StampedScalar()
 
str help_msg
 

Function Documentation

◆ create_bar()

car_keys.main.create_bar (   value,
  min_val,
  max_val,
  length 
)

Create a visual bar representation of a value.

Definition at line 147 of file main.py.

Here is the caller graph for this function:

◆ get_key()

car_keys.main.get_key (   settings,
  timeout 
)

Get a single key from the user.

Definition at line 118 of file main.py.

Here is the caller graph for this function:

◆ main()

car_keys.main.main ( )

Main function to control the pacsim robot using the keyboard.

This function reads the keyboard inputs and updates the control commands accordingly, for the other thread to publish them.

Definition at line 162 of file main.py.

Here is the call graph for this function:

◆ print_status()

car_keys.main.print_status (   acceleration,
  steering 
)

Print current status without clearing the screen.

Definition at line 129 of file main.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ help_msg

str car_keys.main.help_msg
Initial value:
1= """
2w/s: increase/decrease acceleration
3a/d: increase/decrease steering angle
4q: quit
5CTRL-C to force quit
6"""

Definition at line 20 of file main.py.

◆ lateral_command_msg

car_keys.main.lateral_command_msg = StampedScalar()

Definition at line 17 of file main.py.

◆ longitudinal_command_msg

car_keys.main.longitudinal_command_msg = StampedScalar()

Definition at line 18 of file main.py.