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

seqno not neccesary

parent 08de6da6
......@@ -29,7 +29,7 @@ class RabbitMQPublisher(Node):
"cmd_simple_control": {"type": Vector3, "fields": ["x", "y", "z"]},
"cmd_vel": {"type": Twist, "fields": ["linear.y", "angular.z"]},
"em_stop": {"type": Bool, "fields": ["data"]},
"scan": {"type": LaserScan, "fields": ["ranges"]},
# "scan": {"type": LaserScan, "fields": ["ranges"]},
"move_cmd": {"type": AckermannDrive, "fields": ["steering_angle", "speed"]},
}
......@@ -54,7 +54,8 @@ class RabbitMQPublisher(Node):
def get_current_time(self):
now = datetime.datetime.now(datetime.timezone.utc)
now_rounded = now.replace(microsecond=int(now.microsecond / 100000) * 100000)
# now_rounded = now.replace(microsecond=int(now.microsecond / 100000) * 100000)
now_rounded = now
return now_rounded
......@@ -92,8 +93,6 @@ class RabbitMQPublisher(Node):
if self.config["group_values_by_topic"]:
message = {fname: fvalue for fname, fvalue in values_to_forward.items()}
message["time"] = timestamp
message['seqno'] = self.seqno
self.seqno += 1
message_json = json.dumps(message)
print(f"sending message {message}")
......@@ -101,8 +100,6 @@ class RabbitMQPublisher(Node):
else:
for fname, fvalue in values_to_forward.items():
message = {"time": timestamp, fname: fvalue}
message['seqno'] = self.seqno
self.seqno += 1
message_json = json.dumps(message)
print(f"sending message {message}")
......
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