Classes | Functions | Variables
mir_bridge Namespace Reference

Classes

class  MiRBridge
 
class  PublisherWrapper
 
class  SubscriberWrapper
 
class  TopicConfig
 

Functions

def _cmd_vel_dict_filter (msg_dict)
 
def _move_base_feedback_dict_filter (msg_dict)
 
def _move_base_goal_dict_filter (msg_dict)
 
def _move_base_result_dict_filter (msg_dict)
 
def _prepend_tf_prefix_dict_filter (msg_dict)
 
def _remove_tf_prefix_dict_filter (msg_dict)
 
def _tf_dict_filter (msg_dict)
 
def _tf_static_dict_filter (msg_dict)
 
def main ()
 

Variables

list PUB_TOPICS
 
 static_transforms = OrderedDict()
 
list SUB_TOPICS
 
string tf_prefix = ''
 

Function Documentation

◆ _cmd_vel_dict_filter()

def mir_bridge._cmd_vel_dict_filter (   msg_dict)
private
Convert Twist to TwistStamped.

Convert a geometry_msgs/Twist message dict (as sent from the ROS side) to
a geometry_msgs/TwistStamped message dict (as expected by the MiR on
software version >=2.7).

Definition at line 96 of file mir_bridge.py.

◆ _move_base_feedback_dict_filter()

def mir_bridge._move_base_feedback_dict_filter (   msg_dict)
private

Definition at line 80 of file mir_bridge.py.

◆ _move_base_goal_dict_filter()

def mir_bridge._move_base_goal_dict_filter (   msg_dict)
private

Definition at line 72 of file mir_bridge.py.

◆ _move_base_result_dict_filter()

def mir_bridge._move_base_result_dict_filter (   msg_dict)
private

Definition at line 90 of file mir_bridge.py.

◆ _prepend_tf_prefix_dict_filter()

def mir_bridge._prepend_tf_prefix_dict_filter (   msg_dict)
private

Definition at line 159 of file mir_bridge.py.

◆ _remove_tf_prefix_dict_filter()

def mir_bridge._remove_tf_prefix_dict_filter (   msg_dict)
private

Definition at line 186 of file mir_bridge.py.

◆ _tf_dict_filter()

def mir_bridge._tf_dict_filter (   msg_dict)
private

Definition at line 112 of file mir_bridge.py.

◆ _tf_static_dict_filter()

def mir_bridge._tf_static_dict_filter (   msg_dict)
private
Cache tf_static messages (simulate latching).

The tf_static topic needs special handling. Publishers on tf_static are *latched*, which means that the ROS master
caches the last message that was sent by each publisher on that topic, and will forward it to new subscribers.
However, since the mir_driver node appears to the ROS master as a single node with a single publisher on tf_static,
and there are multiple actual publishers hiding behind it on the MiR side, only one of those messages will be
cached. Therefore, we need to implement the caching ourselves and make sure that we always publish the full set of
transforms as a single message.

Definition at line 119 of file mir_bridge.py.

◆ main()

def mir_bridge.main ( )

Definition at line 519 of file mir_bridge.py.

Variable Documentation

◆ PUB_TOPICS

list mir_bridge.PUB_TOPICS

Definition at line 210 of file mir_bridge.py.

◆ static_transforms

mir_bridge.static_transforms = OrderedDict()

Definition at line 60 of file mir_bridge.py.

◆ SUB_TOPICS

list mir_bridge.SUB_TOPICS
Initial value:
1 = [
2  # really geometry_msgs.msg.TwistStamped:
3  TopicConfig('cmd_vel', geometry_msgs.msg.Twist, dict_filter=_cmd_vel_dict_filter),
4  TopicConfig('initialpose', geometry_msgs.msg.PoseWithCovarianceStamped),
5  TopicConfig('light_cmd', std_msgs.msg.String),
6  TopicConfig('mir_cmd', std_msgs.msg.String),
7  TopicConfig('move_base/cancel', actionlib_msgs.msg.GoalID),
8  # really mir_actions/MirMoveBaseActionGoal:
9  TopicConfig('move_base/goal', move_base_msgs.msg.MoveBaseActionGoal, dict_filter=_move_base_goal_dict_filter),
10 ]

Definition at line 351 of file mir_bridge.py.

◆ tf_prefix

string mir_bridge.tf_prefix = ''

Definition at line 59 of file mir_bridge.py.



mir_driver
Author(s): Martin Günther
autogenerated on Wed Nov 13 2024 03:34:54