C++ YASMIN (Yet Another State MachINe)
|
#include <iostream>
#include <memory>
#include <string>
#include "example_interfaces/action/fibonacci.hpp"
#include "yasmin/cb_state.hpp"
#include "yasmin/logs.hpp"
#include "yasmin/state_machine.hpp"
#include "yasmin_ros/action_state.hpp"
#include "yasmin_ros/basic_outcomes.hpp"
#include "yasmin_ros/ros_logs.hpp"
#include "yasmin_ros/yasmin_node.hpp"
#include "yasmin_viewer/yasmin_viewer_pub.hpp"
Classes | |
class | FibonacciState |
Represents the action state for the Fibonacci action. More... | |
Typedefs | |
using | Fibonacci = example_interfaces::action::Fibonacci |
Functions | |
std::string | print_result (std::shared_ptr< yasmin::blackboard::Blackboard > blackboard) |
Prints the result of the Fibonacci action. | |
int | main (int argc, char *argv[]) |
Main function for the Fibonacci action client. | |
using Fibonacci = example_interfaces::action::Fibonacci |
int main | ( | int | argc, |
char * | argv[] ) |
Main function for the Fibonacci action client.
Initializes ROS 2, sets up logging, creates a state machine to manage action states, and executes the Fibonacci action.
argc | Argument count. |
argv | Argument values. |
std::exception | if there is an error during execution. |
std::string print_result | ( | std::shared_ptr< yasmin::blackboard::Blackboard > | blackboard | ) |
Prints the result of the Fibonacci action.
Retrieves the final Fibonacci sequence from the blackboard and outputs it to stderr.
blackboard | Shared pointer to the blackboard storing the Fibonacci sequence. |