A class to monitor if the color sequence reported matches the color displayed in the light buoy. More...
#include <scan_dock_scoring_plugin.hh>
Public Member Functions | |
| ColorSequenceChecker (const std::vector< std::string > &_expectedColors, const std::string &_rosNameSpace, const std::string &_rosColorSequenceService) | |
| Constructor. More... | |
| bool | Correct () const |
| Wheter a team submitted the color sequence and is correct or not. More... | |
| void | Disable () |
| Disable the ROS submission service. More... | |
| void | Enable () |
| Enable the ROS submission service. More... | |
| bool | SubmissionReceived () const |
| Whether a team submitted the color sequence or not. More... | |
Private Member Functions | |
| bool | OnColorSequence (ros::ServiceEvent< vrx_gazebo::ColorSequence::Request, vrx_gazebo::ColorSequence::Response > &_event) |
| Callback executed when a new color submission is received. More... | |
Private Attributes | |
| bool | colorSequenceReceived = false |
| Whether the color sequence has been received or not. More... | |
| ros::ServiceServer | colorSequenceServer |
| Service to generate and display a new color sequence. More... | |
| std::string | colorSequenceService |
| ROS topic where the color sequence should be sent. More... | |
| bool | correctSequence = false |
| Whether the color sequence received is correct or not. More... | |
| std::vector< std::string > | expectedSequence |
| The expected color sequence. More... | |
| ros::NodeHandle | nh |
| ROS Node handle. More... | |
| std::string | ns |
| ROS namespace. More... | |
A class to monitor if the color sequence reported matches the color displayed in the light buoy.
Definition at line 38 of file scan_dock_scoring_plugin.hh.
| ColorSequenceChecker::ColorSequenceChecker | ( | const std::vector< std::string > & | _expectedColors, |
| const std::string & | _rosNameSpace, | ||
| const std::string & | _rosColorSequenceService | ||
| ) |
Constructor.
| [in] | _expectedColors | The sequence of expected colors. |
| [in] | _rosNameSpace | ROS namespace. |
| [in] | _rosColorSequenceService | The ROS service used to receive the color submisison. |
Definition at line 24 of file scan_dock_scoring_plugin.cc.
| bool ColorSequenceChecker::Correct | ( | ) | const |
Wheter a team submitted the color sequence and is correct or not.
Definition at line 60 of file scan_dock_scoring_plugin.cc.
| void ColorSequenceChecker::Disable | ( | ) |
Disable the ROS submission service.
Definition at line 48 of file scan_dock_scoring_plugin.cc.
| void ColorSequenceChecker::Enable | ( | ) |
Enable the ROS submission service.
Definition at line 41 of file scan_dock_scoring_plugin.cc.
|
private |
Callback executed when a new color submission is received.
| [in] | _request | Contains the submission. |
| [out] | _res | The Response. Note that this will be true even if the reported sequence is incorrect. |
Definition at line 66 of file scan_dock_scoring_plugin.cc.
| bool ColorSequenceChecker::SubmissionReceived | ( | ) | const |
Whether a team submitted the color sequence or not.
Definition at line 54 of file scan_dock_scoring_plugin.cc.
|
private |
Whether the color sequence has been received or not.
Definition at line 87 of file scan_dock_scoring_plugin.hh.
|
private |
Service to generate and display a new color sequence.
Definition at line 84 of file scan_dock_scoring_plugin.hh.
|
private |
ROS topic where the color sequence should be sent.
Definition at line 78 of file scan_dock_scoring_plugin.hh.
|
private |
Whether the color sequence received is correct or not.
Definition at line 90 of file scan_dock_scoring_plugin.hh.
|
private |
The expected color sequence.
Definition at line 72 of file scan_dock_scoring_plugin.hh.
|
private |
ROS Node handle.
Definition at line 81 of file scan_dock_scoring_plugin.hh.
|
private |
ROS namespace.
Definition at line 75 of file scan_dock_scoring_plugin.hh.