Commit 9f52b2dc authored by Gill Lumer-Klabbers's avatar Gill Lumer-Klabbers
Browse files

Point not stamped

parent c88b07e1
......@@ -21,11 +21,15 @@ class unifmuRosPointRx:
# self._update_outputs()
def msg_received_callback(self, msg: PointStamped):
def msg_received_callback(self, msg: Point):
# self.rosnode.get_logger().info(f"RECEIVED A MESSAGE I HAVE: '{msg}''")
self.x = msg.point.x
self.y = msg.point.y
self.z = msg.point.z
# self.x = msg.point.x
# self.y = msg.point.y
# self.z = msg.point.z
self.x = msg.x
self.y = msg.y
self.z = msg.z
def fmi2DoStep(self, current_time, step_size, no_step_prior):
rclpy.spin_once(self.rosnode, timeout_sec=(step_size * 0.8))
......@@ -37,8 +41,7 @@ class unifmuRosPointRx:
self.z = 0.0
rclpy.init()
self.rosnode = rclpy.create_node('fmunode_point_rx')
self.subscription = self.rosnode.create_subscription(PointStamped, self.topic_name, self.msg_received_callback, 10)
return Fmi2Status.ok
self.subscription = self.rosnode.create_subscription(Point, self.topic_name, self.msg_received_callback, 10)
return Fmi2Status.ok
def fmi2ExitInitializationMode(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment