|
| 1 | +#include <example_behaviors/example_get_pose_stamped_from_topic.hpp> |
| 2 | + |
| 3 | +#include <moveit_studio_behavior_interface/impl/get_message_from_topic_impl.hpp> |
| 4 | + |
| 5 | +namespace example_behaviors |
| 6 | +{ |
| 7 | +// Mirrors the PoseStamped specialization produced by generate_topic_interface_behaviors.py so developers |
| 8 | +// can see the generated pattern inside example_behaviors. |
| 9 | +ExampleGetPoseStampedFromTopic::ExampleGetPoseStampedFromTopic( |
| 10 | + const std::string& name, const BT::NodeConfiguration& config, |
| 11 | + const std::shared_ptr<moveit_studio::behaviors::BehaviorContext>& shared_resources) |
| 12 | + : GetMessageFromTopicBehaviorBase<geometry_msgs::msg::PoseStamped>(name, config, shared_resources) |
| 13 | +{ |
| 14 | +} |
| 15 | + |
| 16 | +BT::PortsList ExampleGetPoseStampedFromTopic::providedPorts() |
| 17 | +{ |
| 18 | + return BT::PortsList({ |
| 19 | + BT::InputPort<std::string>(kPortIDTopicName, "/pose_stamped", |
| 20 | + "Topic that publishes <code>geometry_msgs::msg::PoseStamped</code> messages."), |
| 21 | + BT::OutputPort<geometry_msgs::msg::PoseStamped>(kPortIDMessageOut, "{pose_stamped}", |
| 22 | + "Output pose from the subscribed topic."), |
| 23 | + }); |
| 24 | +} |
| 25 | + |
| 26 | +BT::KeyValueVector ExampleGetPoseStampedFromTopic::metadata() |
| 27 | +{ |
| 28 | + return { { "subcategory", "Example Behaviors" }, |
| 29 | + { "description", "Capture a pose stamped message from a topic and store it on the blackboard." } }; |
| 30 | +} |
| 31 | + |
| 32 | +} // namespace example_behaviors |
| 33 | + |
| 34 | +template class moveit_studio::behaviors::GetMessageFromTopicBehaviorBase<geometry_msgs::msg::PoseStamped>; |
0 commit comments