Class Transaction

Inheritance Relationships

Base Type

  • public fuse_core::AsyncSensorModel

Class Documentation

class Transaction : public fuse_core::AsyncSensorModel

An adapter-type sensor that produces transactions with the same added and removed constraints from an input transaction. This is useful for debugging purposes because it allows to play back the recorded transactions.

This sensor subscribes to a fuse_msgs::msg::SerializedTransaction topic and deserializes each received message into a transaction.

Parameters:

  • ~queue_size (int, default: 10) The subscriber queue size for the transaction messages

  • ~topic (string) The topic to which to subscribe for the transaction messages

Subscribes:

  • topic (fuse_msgs::msg::SerializedTransaction) Transaction

Public Types

using ParameterType = parameters::TransactionParams

Public Functions

Transaction()

Default constructor.

virtual ~Transaction() = default

Destructor.

void initialize(fuse_core::node_interfaces::NodeInterfaces<ALL_FUSE_CORE_NODE_INTERFACES> interfaces, const std::string &name, fuse_core::TransactionCallback transaction_callback) override

Shadowing extension to the AsyncSensorModel::initialize call.

Protected Functions

virtual void onInit() override

Loads ROS parameters and subscribes to the parameterized topic.

virtual void onStart() override

Subscribe to the input topic to start sending transactions to the optimizer.

virtual void onStop() override

Unsubscribe from the input topic to stop sending transactions to the optimizer.

void process(const fuse_msgs::msg::SerializedTransaction &msg)

Callback for transaction messages.

Parameters:

msg[in] - The transaction message to process

Protected Attributes

fuse_core::node_interfaces::NodeInterfaces<fuse_core::node_interfaces::Base, fuse_core::node_interfaces::Logging, fuse_core::node_interfaces::Parameters, fuse_core::node_interfaces::Topics, fuse_core::node_interfaces::Waitables> interfaces_

Shadows AsyncSensorModel interfaces_.

ParameterType params_

Object containing all of the configuration parameters.

rclcpp::Subscription<fuse_msgs::msg::SerializedTransaction>::SharedPtr sub_

Deserializer for SerializedTransaction messages.

fuse_core::TransactionDeserializer transaction_deserializer_