pose_to_odom.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import rospy
3 from geometry_msgs.msg import PoseWithCovarianceStamped
4 from nav_msgs.msg import Odometry
5 
6 def callback(data):
7  odom = Odometry()
8  odom.header = data.header
9  odom.child_frame_id = child_frame_id
10  odom.pose = data.pose
11  pub.publish(odom)
12 
13 if __name__ == '__main__':
14  rospy.init_node('pose_to_odom', anonymous=True)
15  pub = rospy.Publisher('odom_combined', Odometry, queue_size=1)
16  child_frame_id = rospy.get_param('~child_frame_id', "base_footprint")
17  rospy.Subscriber("/robot_pose_ekf/odom_combined", PoseWithCovarianceStamped, callback)
18  rospy.spin()
def callback(data)
Definition: pose_to_odom.py:6


rtabmap_ros
Author(s): Mathieu Labbe
autogenerated on Tue Jan 24 2023 04:04:40