The rclcpp::Node representing the connection between ROS and the R2Sonic Unit.
More...
#include <r2sonic_node.hpp>
|
struct | MsgBuffer |
| a container for the messages we want to buffer More...
|
|
struct | msgMtx_ |
| a colleciton of rosmessageg publisher and a mutex grouped for convienence. More...
|
|
struct | Parameters |
| a Structure that corresponds to the parameters advertised by the R2SonicNode class. All params assoicated with this struct will have the same structure struct. Example: topics.detections member mapps to param "topics/detections" More...
|
|
|
template<typename T > |
using | msgMtx = msgMtx_<T, T> |
| Typedef for a single message, useful if you don't need to assemble multiple packets.
|
|
template<typename T > |
using | msgMap = std::map<u32, T> |
| This typedef is useful for messages that need to be assmebled from multiple packets.
|
|
template<typename T > |
using | msgMtxMap = msgMtx_< T, msgMap<T> > |
| Creates a msgMtx with a map of messages for assembling multiple packets into one ros message.
|
|
|
template<typename T > |
void | cleanMsgMap (msgMap< T > *msg_map, u32 ping_no) |
| removes incomplete messages from the map if they are too old based on the ping_number
|
|
bool | shouldAdvertise (std::string topic) |
| Holds the conditions that determine if the a tiopic should be advertised.
|
|
bool | shouldPublish (rclcpp::PublisherBase::SharedPtr pub) |
| Checks to see if there are any subscribers to a topic before computing and publishing it.
|
|
The rclcpp::Node representing the connection between ROS and the R2Sonic Unit.
◆ msgMap
This typedef is useful for messages that need to be assmebled from multiple packets.
◆ msgMtx
Typedef for a single message, useful if you don't need to assemble multiple packets.
◆ msgMtxMap
Creates a msgMtx with a map of messages for assembling multiple packets into one ros message.
◆ R2SonicNode()
R2SonicNode::R2SonicNode |
( |
| ) |
|
◆ cleanMsgMap() [1/2]
template<typename T >
void r2sonic::R2SonicNode::cleanMsgMap |
( |
msgMap< T > * | msg_map, |
|
|
u32 | ping_no ) |
|
protected |
removes incomplete messages from the map if they are too old based on the ping_number
- Parameters
-
◆ cleanMsgMap() [2/2]
template<typename T >
void r2sonic::R2SonicNode::cleanMsgMap |
( |
msgMap< T > * | msg_map, |
|
|
u32 | ping_no ) |
◆ getParams()
const Parameters & r2sonic::R2SonicNode::getParams |
( |
| ) |
|
|
inline |
◆ publish() [1/2]
Publishes all ros2 messages corresponding to a received AID0 Packet.
- Parameters
-
Publishes | all ros2 messages corresponding to a received AID0 Packet. |
◆ publish() [2/2]
Publishes all ros2 messages corresponding to a received BTH0 Packet.
- Parameters
-
Publishes | all ros2 messages corresponding to a received BTH0 Packet. |
◆ shouldAdvertise()
bool R2SonicNode::shouldAdvertise |
( |
std::string | topic | ) |
|
|
protected |
Holds the conditions that determine if the a tiopic should be advertised.
- Parameters
-
topic | the topic you want to test |
- Returns
- true if you should advertise it
◆ shouldPublish()
bool R2SonicNode::shouldPublish |
( |
rclcpp::PublisherBase::SharedPtr | pub | ) |
|
|
protected |
Checks to see if there are any subscribers to a topic before computing and publishing it.
- Parameters
-
pub | the publisher you want to check |
- Returns
- true if you should publish on that publisher (e.g. has subscribers)
◆ msg_buffer_
◆ parameters_
potected storage for parametrs
The documentation for this class was generated from the following files: