Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 74

Reset Odometry poses

$
0
0
Hi , I am trying to create a script in python that resets the odometry values I get from my odometry topic but does not seem to work. Any thoughts?? Thanks in advance. #! /usr/bin/env python import rospy from geometry_msgs.msg import Twist from math import atan2,pi,pow,sqrt,radians from nav_msgs.msg import Odometry from tf.transformations import euler_from_quaternion, quaternion_from_euler import math import tf rospy.init_node('reset_robot_node', anonymous=True) pub2 = rospy.Publisher('/marvin/diff_drive_controller/odom', Odometry,queue_size=1) msg1=Odometry() msg1.pose.pose.position.x=None msg1.pose.pose.position.y=None msg1.pose.pose.position.z=None msg1.pose.pose.orientation.x=None msg1.pose.pose.orientation.y=None msg1.pose.pose.orientation.z=None msg1.pose.pose.orientation.z=None pub1.publish(msg1)

Viewing all articles
Browse latest Browse all 74

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>