Go to the documentation of this file.
34 #ifndef RC_VISARD_ROS_PROTOBUF2ROS_STREAM_H
35 #define RC_VISARD_ROS_PROTOBUF2ROS_STREAM_H
60 const std::string& frame_id_prefix)
68 virtual void publishToRos(std::shared_ptr<::google::protobuf::Message> pbMsg);
86 const std::string& frame_id_prefix,
bool tfEnabled)
89 std::string pbMsgType =
_rcdyn->getPbMsgTypeOfStream(
_stream);
90 if (pbMsgType !=
"Frame")
92 std::stringstream
msg;
93 msg <<
"Invalid stream type! Can instantiate PoseAndTFStream only for rc_dynamics streams of type 'Frame' "
94 <<
"but got stream '" << stream <<
"' which is of type '" << pbMsgType <<
"'!";
95 throw std::invalid_argument(
msg.str());
102 virtual void publishToRos(std::shared_ptr<::google::protobuf::Message> pbMsg)
override;
104 std::shared_ptr<tf::TransformBroadcaster>
_tf_pub;
119 const std::string& frame_id_prefix,
bool publishImu2CamAsTf)
122 std::string pbMsgType =
_rcdyn->getPbMsgTypeOfStream(
_stream);
123 if (pbMsgType !=
"Dynamics")
125 std::stringstream
msg;
126 msg <<
"Invalid stream type! Can instantiate DynamicsStream only for rc_dynamics streams of type 'Dynamics' "
127 <<
"but got stream '" << stream <<
"' which is of type '" << pbMsgType <<
"'!";
128 throw std::invalid_argument(
msg.str());
135 virtual void publishToRos(std::shared_ptr<::google::protobuf::Message> pbMsg)
override;
139 std::shared_ptr<tf::TransformBroadcaster>
_tf_pub;
144 #endif // RC_VISARD_ROS_PROTOBUF2ROS_STREAM_H
std::shared_ptr< tf::TransformBroadcaster > _tf_pub
Implementation of a ThreadedStream that receives rc_visard's dynamics protobuf messages and re-publis...
std::shared_ptr< ros::Publisher > _pub_markers
virtual void publishToRos(std::shared_ptr<::google::protobuf::Message > pbMsg) override
Specific implementation for roboception::msgs::Frame messages that publishes received messages not on...
const std::string _tfPrefix
virtual bool checkRosPublishersUsed() override
virtual void initRosPublishers() override
std::shared_ptr< RemoteInterface > Ptr
virtual bool startReceivingAndPublishingAsRos() override
Specific implementation for roboception::msgs::Dynamics messages.
DynamicsStream(rc::dynamics::RemoteInterface::Ptr rcdIface, const std::string &stream, ros::NodeHandle &nh, const std::string &frame_id_prefix, bool publishImu2CamAsTf)
virtual void initRosPublishers() override
bool _publishVisualizationMarkers
Protobuf2RosStream(rc::dynamics::RemoteInterface::Ptr rcdIface, const std::string &stream, ros::NodeHandle &nh, const std::string &frame_id_prefix)
virtual void publishToRos(std::shared_ptr<::google::protobuf::Message > pbMsg)
std::shared_ptr< Protobuf2RosPublisher > _rosPublisher
virtual void initRosPublishers()
std::shared_ptr< tf::TransformBroadcaster > _tf_pub
virtual void publishToRos(std::shared_ptr<::google::protobuf::Message > pbMsg) override
virtual bool checkRosPublishersUsed()
PoseAndTFStream(rc::dynamics::RemoteInterface::Ptr rcdIface, const std::string &stream, ros::NodeHandle &nh, const std::string &frame_id_prefix, bool tfEnabled)
std::shared_ptr< ros::Publisher > _pub_odom
virtual bool checkRosPublishersUsed() override
rc::dynamics::RemoteInterface::Ptr _rcdyn
Convenience classes to implement and manage different types of data streams in separate threads.
rc_visard_driver
Author(s): Heiko Hirschmueller
, Christian Emmerich , Felix Ruess
autogenerated on Sun May 15 2022 02:25:43