Skip to content
Snippets Groups Projects
Commit 7939e4e0 authored by Emil Harlan's avatar Emil Harlan
Browse files

a

parent 0db5c095
No related branches found
No related tags found
No related merge requests found
......@@ -21,11 +21,11 @@ class OdometryPublisher(Node):
def sub_position_handler(self, position_info):
self.x, self.y, self.z = position_info
self.publish_odometry()
print("ok")
self.publish_odometry()
def publish_odometry(self):
print("ja")
q = self.quaternion_from_euler(0, 0, -self.z* math.pi/180)
msg = Odometry()
msg.header.stamp = self.get_clock().now().to_msg()
......@@ -37,6 +37,7 @@ class OdometryPublisher(Node):
msg.pose.pose.orientation.z = q[2]
msg.pose.pose.orientation.w = 0
self.publisher_.publish(msg)
print("ja")
def quaternion_from_euler(self, ai, aj, ak):
ai /= 2.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment