Skip to content

Commit

Permalink
update node for monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy-Zhang13798 committed Sep 11, 2023
1 parent 92a34ad commit 9f688fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ Run CPU_monitor
roslaunch cpu_monitor cpu_monitor.launch poll_period:=1
```

Run python scripts to show CPU and memory usage of our nodes, cpu_mem2.py will print the current mean value of our nodes.
Run python scripts to show CPU and memory usage of our nodes, cpu_mem2.py will print the current mean value of CPU and memory usage of our nodes. If you just use the original raw pointcloud directly to kiss-icp, please set: use_keypoint_pointcloud=False, inside the codes.

```
python3 cpu_mem2.py
python cpu_mem2.py
```

Play the rosbag
Expand Down
4 changes: 4 additions & 0 deletions scripts/cpu_mem2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from std_msgs.msg import UInt64
import time


odometry_node_cpu_data = None
odometry_node_mem_data = None
keypoints_node_cpu_data = None
Expand All @@ -18,6 +19,7 @@




def odometry_node_cpu_cb(data):
global odometry_node_cpu_data
odometry_node_cpu_data = data.data
Expand Down Expand Up @@ -68,6 +70,7 @@ def print_data_only_odometry():


def listener():

rospy.init_node('listener', anonymous=True)

rospy.Subscriber("/cpu_monitor/odometry_node/cpu", Float32, odometry_node_cpu_cb)
Expand All @@ -78,4 +81,5 @@ def listener():
rospy.spin()

if __name__ == '__main__':

listener()

0 comments on commit 9f688fb

Please sign in to comment.