How to get length of array if poses from nav_msgs/Path.msg
Does anyone know how to use the message type nav_msgs/Path.msg. according to the wiki it is an array of poses that are used to plan a path but it I'm unable to get the msg in array form. I need to get the length of the array for my purposes which is why I'm asking. How do I go about that? right now I just have this:
#!/usr/bin/python3
import rospy
from nav_msgs.msg import Path
from rospy.numpy_msg import numpy_msg
import numpy as np
def callback(msg):
print("list: ", msg)
rospy.init_node("tester_3")
rospy.Subscriber("/move_base/NavfnROS/plan",Path,callback)
rospy.spin()