|
Formula Student Autonomous Systems
The code for the main driverless system
|
Class responsible for the Inspection Mission of the car. More...
#include <inspection_ros.hpp>


Public Member Functions | |
| void | mission_decider (custom_interfaces::msg::OperationalStatus::SharedPtr mission_signal) |
| recieves GoSignal and stores the mission that should be ran | |
| void | inspection_script () |
| Function to publish control command while time is less than the defined time limit. | |
| void | update_rpms_callback (const custom_interfaces::msg::WheelRPM &motor_rpm) |
| Function to update the current rpms of the wheels. | |
| void | publish_controls (double throttle, double steering) const |
| Publishes the control command. | |
| InspectionMission () | |
| Contruct a new Inspection Mission with constants defined in file. | |
Private Types | |
| using | WSSPolicy = message_filters::sync_policies::ApproximateTime< custom_interfaces::msg::WheelRPM, custom_interfaces::msg::WheelRPM > |
Private Member Functions | |
| void | end_of_mission () |
| Rotations per minute of the motor. | |
| void | handle_end_of_mission_response (rclcpp::Client< std_srvs::srv::Trigger >::SharedFuture future) const |
| Function to end communication of end of mission. | |
Private Attributes | |
| rclcpp::Client< std_srvs::srv::Trigger >::SharedPtr | _finish_client_ |
| rclcpp::Client< std_srvs::srv::Trigger >::SharedPtr | _emergency_client_ |
| rclcpp::Publisher< custom_interfaces::msg::ControlCommand >::SharedPtr | _control_command_publisher_ |
| rclcpp::Subscription< custom_interfaces::msg::OperationalStatus >::SharedPtr | _mission_signal_subscription_ |
| rclcpp::Subscription< custom_interfaces::msg::WheelRPM >::SharedPtr | _motor_rpm_subscription_ |
| rclcpp::TimerBase::SharedPtr | _timer_ |
| std::shared_ptr< message_filters::Synchronizer< WSSPolicy > > | _sync_ |
| rclcpp::TimerBase::SharedPtr | _mission_end_timer_ |
| bool | _mission_end_timer_started_ = false |
| Timer for repetition of end of mission signal. | |
| bool | _car_stopped_ = false |
| rclcpp::TimerBase::SharedPtr | _main_callback_timer_ |
| rclcpp::Clock | _clock_ |
| Timer for main callback. | |
| rclcpp::Time | _initial_time_ |
| InspectionFunctions | _inspection_object_ = InspectionFunctions() |
| Ellapsed time in seconds. | |
| bool | _go_ = false |
| common_lib::competition_logic::Mission | _mission_ |
| Flag to start the mission. | |
| double | _motor_rpm_ = 0.0 |
| Mission to be executed;. | |
Class responsible for the Inspection Mission of the car.
This class inherits from rclcpp::Node, subscribing to current velocity and publishing control commands.
Definition at line 29 of file inspection_ros.hpp.
|
private |
Definition at line 41 of file inspection_ros.hpp.
| InspectionMission::InspectionMission | ( | ) |
Contruct a new Inspection Mission with constants defined in file.
Definition at line 8 of file inspection_ros.cpp.

|
private |
Rotations per minute of the motor.
Function for communication of end of mission (or emergency according to the mission)
Definition at line 172 of file inspection_ros.cpp.


|
private |
Function to end communication of end of mission.
Definition at line 190 of file inspection_ros.cpp.

| void InspectionMission::inspection_script | ( | ) |
Function to publish control command while time is less than the defined time limit.
| current_rpm | rotations of the wheels per minute |
Definition at line 90 of file inspection_ros.cpp.


| void InspectionMission::mission_decider | ( | custom_interfaces::msg::OperationalStatus::SharedPtr | mission_signal | ) |
recieves GoSignal and stores the mission that should be ran
| mission_signal | GoSignal |
Definition at line 48 of file inspection_ros.cpp.


| void InspectionMission::publish_controls | ( | double | throttle, |
| double | steering | ||
| ) | const |
Publishes the control command.
| throttle | throttle to be applied |
| steering | steering angle to be applied |
Definition at line 163 of file inspection_ros.cpp.

| void InspectionMission::update_rpms_callback | ( | const custom_interfaces::msg::WheelRPM & | motor_rpm | ) |
Function to update the current rpms of the wheels.
| motor_rpm | rotations of the motor per minute |
Definition at line 85 of file inspection_ros.cpp.

|
private |
Definition at line 50 of file inspection_ros.hpp.
|
private |
Timer for main callback.
Definition at line 52 of file inspection_ros.hpp.
|
private |
Definition at line 33 of file inspection_ros.hpp.
|
private |
Definition at line 32 of file inspection_ros.hpp.
|
private |
Definition at line 31 of file inspection_ros.hpp.
|
private |
Definition at line 56 of file inspection_ros.hpp.
|
private |
Definition at line 53 of file inspection_ros.hpp.
|
private |
Ellapsed time in seconds.
Definition at line 54 of file inspection_ros.hpp.
|
private |
Definition at line 51 of file inspection_ros.hpp.
|
private |
Flag to start the mission.
Definition at line 57 of file inspection_ros.hpp.
|
private |
Definition at line 48 of file inspection_ros.hpp.
|
private |
Timer for repetition of end of mission signal.
Definition at line 49 of file inspection_ros.hpp.
|
private |
Definition at line 36 of file inspection_ros.hpp.
|
private |
Mission to be executed;.
Definition at line 59 of file inspection_ros.hpp.
|
private |
Definition at line 37 of file inspection_ros.hpp.
|
private |
Definition at line 45 of file inspection_ros.hpp.
|
private |
Definition at line 38 of file inspection_ros.hpp.