Contains the GUI's for controlling the vehicle.
- MissionControlGUI - controls the state_machine.
- RobotSteeringGUI - controls the car using ackermann_msgs/AckermannDriveStamped messages (a fork of rqt_robot_steering).
For a basic usage guide see How To Launch eufs_sim.
Label | Type | Default | Purpose |
---|---|---|---|
- | QLineEdit | /cmd | Determines the topic to which the Robot Steering GUI commands are published (as ackermann_msgs/AckermannDriveStamped messages). |
Stop | QPushButton | - | Resets sliders to zero. |
- | QSlider (vertical) | 0 | Linear velocity/acceleration (m/s or m/s^2) sent on commands topic. |
- | QSlider (horizontal) | 0 | Steering angle (radians) sent on commands topic. |
The 4 QDoubleSpinBox objects set the minimum and maximum values of the sliders. The default values of these are dynamic with respect to the command mode. For the acceleration command mode they all default to +/- 1.00. For the velocity command mode the steering angle max/min values remain at +/-1.00 radians, but the linear velocity max/min values become +/-5.00 m/s.
The label showing the vertical slider value also changes to the appropriate units with command mode.
The '0' QPushButtons reset each individual slider to zero.
The +/- and >/< QPushButtons increment their sliders by a fixed amount.
The Robot Steering GUI doesn't use a publisher with a static topic name, instead the topic name can be set dynamically via a textbox input on the GUI.
By default, the topic used is /cmd
.
The GUI publishes vehicle command onto this topic using ackermann_msgs/AckermannDriveStamped messages.
Name | Type | Purpose |
---|---|---|
/race_car_model/command_mode |
std_srvs/Trigger | Sends a request to the race car model plugin, which should return the vehicle command mode. GUI will not display until a response is received. |
Label | Type | Default | Purpose |
---|---|---|---|
Mission | QComboBox | NOT_SELECTED | Selects a mission. |
Set Mission | QPushButton | - | Requests that the state_machine changes it's AMI state to the mission corresponding to the adjacent QComboBox's current text. |
Mission (lower) | QLabel | NOT_SELECTED | Displays the current running Mission. |
Manual Drive | QPushButton | - | Requests that the state_machine changes it's AMI state to AMI_MANUAL. |
State | QLabel | OFF | Displays the current state_machine AS state. |
Reset State | QPushButton | - | Requests AS and AMI state reset. |
Reset Simulation | QPushButton | - | Resets AS and AMI states, vehicle position and cone positions. |
Request EBS | QPushButton | - | Requests that the state_machine changes it's AS state to AS_EMERGENCY_BRAKE and stop the car. |
Name | Type | Purpose |
---|---|---|
/ros_can/set_mission |
eufs_msgs/CanState | Sends a mission request to the state_machine. Note that in the CanState message only the AMI state is used. |
Name | Type | Purpose |
---|---|---|
/ros_can/state |
eufs_msgs/CanState | Obtains the simulated vehicle's current AS and AMI state and displays it on the GUI. |
Name | Type | Purpose |
---|---|---|
/ros_can/ebs |
std_srvs/Trigger | Requests that the current AS state in the state_machine be changed to AS_EMERGENCY_BRAKE . |
/ros_can/reset |
std_srvs/Trigger | Requests that the state_machine resets its state. |
/ros_can/reset_vehicle_pos |
std_srvs/Trigger | Sends a request to the race car model plugin to reset the vehicle position. |
/ros_can/reset_cone_pos |
std_srvs/Trigger | Sends a request to the cone ground truth plugin to reset the cone position. |
The layout of the Robot Steering GUI is defined in EUFSRobotSteeringGUI.ui. The layout of the Mission Control GUI is defined in MissionControlGUI.ui. You can edit, add and remove features on the GUI's from here.
After this you must generate a perspective file.
Save this in the config directory of this package and make sure to add it to the package setup file.
The GUI can be launched as part of a rqt_gui
ROS 2 node. The package
parameter must be rqt_gui
and the perspective file must be passed as an argument.
An example of this can be found in load_car.launch.py.