Skip to content

Commit

Permalink
fix influx record
Browse files Browse the repository at this point in the history
  • Loading branch information
adev4a committed Mar 1, 2024
1 parent e893b05 commit b4653c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def process_rosbag(self,rosbag2_path):

def create_record_from_msg(self, msg, measurement_name):

topic = msg.channel.topic
topic = msg.channel.topic[1:]
ros_msg = msg.ros_msg
msg_attributes = self.extract_attributes(ros_msg)
msg_timestamp = msg.publish_time_ns
Expand All @@ -133,7 +133,7 @@ def create_record_from_msg(self, msg, measurement_name):
records.append(f"{attr_name}={attr_value}")


return f"{measurement_name},topic_name={topic}," + ",".join(records) + f" timestamp={msg_timestamp}"
return f"{measurement_name},topic_name={topic} " + ",".join(records) + f",timestamp={msg_timestamp} {msg_timestamp}"


def extract_attributes(self, obj, parent_attr=None):
Expand Down

0 comments on commit b4653c1

Please sign in to comment.