|
C++ YASMIN (Yet Another State MachINe)
|
#include <iostream>#include <memory>#include <string>#include "rclcpp/rclcpp.hpp"#include "std_msgs/msg/int32.hpp"#include "yasmin/cb_state.hpp"#include "yasmin/logs.hpp"#include "yasmin/state_machine.hpp"#include "yasmin_ros/basic_outcomes.hpp"#include "yasmin_ros/publisher_state.hpp"#include "yasmin_ros/ros_logs.hpp"#include "yasmin_viewer/yasmin_viewer_pub.hpp"
Classes | |
| class | PublishIntState |
| A state that publishes ints. More... | |
Functions | |
| std::string | check_count (std::shared_ptr< yasmin::blackboard::Blackboard > blackboard) |
| Check the count in the blackboard and return an outcome based on it. | |
| int | main (int argc, char *argv[]) |
| std::string check_count | ( | std::shared_ptr< yasmin::blackboard::Blackboard > | blackboard | ) |
Check the count in the blackboard and return an outcome based on it.
This function checks the value of "counter" in the blackboard and compares it with "max_count". If "counter" exceeds "max_count", it returns "outcome1", otherwise it returns "outcome2".
| blackboard | Shared pointer to the blackboard. |
| int main | ( | int | argc, |
| char * | argv[] ) |