Closed rkoyama1623-2021 closed 3 years ago
Sorry, I misunderstood the way to use the function, and the right sample code is as follows:
import PyKDL
import rospy
import tf2_ros
from tf2_kdl import to_msg_vector
vector = tf2_ros.Stamped(PyKDL.Vector(), rospy.Time(0), 'some_frame')
msg = to_msg_vector(vector)
We may express the type of vector
in this function as tf2_ros.Stamped(PyKDL.Vector)
instead of PyKDL.Vector
I think we cannot use the function
tf2_kdl.to_msg_vector
, because the PyKDL.Vector do not have header attribute.I think following line should be removed, since the
PyKDL.Vector
do not have the information of timestamp.https://github.com/ros/geometry2/blob/3ca66d97a8b732a9fda5c74ca466001d66d7196a/tf2_kdl/src/tf2_kdl/tf2_kdl.py#L76
I might misunderstand the way to use the function
tf2_kdl.to_msg_vector
, so please let me know if my understanding is right or not.Thank you.