Example class that can hold state and provide methods that handle incoming data. More...
Public Member Functions | |
void | break_beam_callback (const osrf_gear::Proximity::ConstPtr &msg) |
Called when a new Proximity message is received. | |
void | competition_state_callback (const std_msgs::String::ConstPtr &msg) |
Called when a new message is received. | |
void | current_score_callback (const std_msgs::Float32::ConstPtr &msg) |
Called when a new message is received. | |
void | goal_callback (const osrf_gear::Goal::ConstPtr &goal_msg) |
Called when a new Goal message is received. | |
void | joint_state_callback (const sensor_msgs::JointState::ConstPtr &joint_state_msg) |
Called when a new JointState message is received. | |
void | logical_camera_callback (const osrf_gear::LogicalCameraImage::ConstPtr &image_msg) |
Called when a new LogicalCameraImage message is received. | |
MyCompetitionClass (ros::NodeHandle &node) | |
void | send_arm_to_zero_state () |
Create a JointTrajectory with all positions set to zero, and command the arm. | |
Private Attributes | |
std::string | competition_state_ |
sensor_msgs::JointState | current_joint_states_ |
double | current_score_ |
bool | has_been_zeroed_ |
ros::Publisher | joint_trajectory_publisher_ |
std::vector< osrf_gear::Goal > | received_goals_ |
Example class that can hold state and provide methods that handle incoming data.
Definition at line 58 of file gear_example_node.cpp.
MyCompetitionClass::MyCompetitionClass | ( | ros::NodeHandle & | node | ) | [inline, explicit] |
Definition at line 61 of file gear_example_node.cpp.
void MyCompetitionClass::break_beam_callback | ( | const osrf_gear::Proximity::ConstPtr & | msg | ) | [inline] |
Called when a new Proximity message is received.
Definition at line 139 of file gear_example_node.cpp.
void MyCompetitionClass::competition_state_callback | ( | const std_msgs::String::ConstPtr & | msg | ) | [inline] |
Called when a new message is received.
Definition at line 80 of file gear_example_node.cpp.
void MyCompetitionClass::current_score_callback | ( | const std_msgs::Float32::ConstPtr & | msg | ) | [inline] |
Called when a new message is received.
Definition at line 71 of file gear_example_node.cpp.
void MyCompetitionClass::goal_callback | ( | const osrf_gear::Goal::ConstPtr & | goal_msg | ) | [inline] |
Called when a new Goal message is received.
Definition at line 89 of file gear_example_node.cpp.
void MyCompetitionClass::joint_state_callback | ( | const sensor_msgs::JointState::ConstPtr & | joint_state_msg | ) | [inline] |
Called when a new JointState message is received.
Definition at line 96 of file gear_example_node.cpp.
void MyCompetitionClass::logical_camera_callback | ( | const osrf_gear::LogicalCameraImage::ConstPtr & | image_msg | ) | [inline] |
Called when a new LogicalCameraImage message is received.
Definition at line 131 of file gear_example_node.cpp.
void MyCompetitionClass::send_arm_to_zero_state | ( | ) | [inline] |
Create a JointTrajectory with all positions set to zero, and command the arm.
Definition at line 113 of file gear_example_node.cpp.
Definition at line 146 of file gear_example_node.cpp.
sensor_msgs::JointState MyCompetitionClass::current_joint_states_ [private] |
Definition at line 150 of file gear_example_node.cpp.
double MyCompetitionClass::current_score_ [private] |
Definition at line 147 of file gear_example_node.cpp.
bool MyCompetitionClass::has_been_zeroed_ [private] |
Definition at line 151 of file gear_example_node.cpp.
Definition at line 148 of file gear_example_node.cpp.
std::vector<osrf_gear::Goal> MyCompetitionClass::received_goals_ [private] |
Definition at line 149 of file gear_example_node.cpp.