what should the frame_id of topic "poseX" be, before use robot_localization package?
Hello:
According to r_l
(robot_localization) wiki, coordinate-frames-and-transforming-sensor-data doc, it can transforms geometry_msgs/PoseWithCovarianceStamped,
on topic "poseX", in message header’s frame_id into the coordinate frame specified by the world_frame parameter (typically map or odom). I think this topic probably can be provided by a stereo VO, because mono VO cannot provide real scale info.
when i see the "poseX" callback function, it then calls preparePose func, in this line RosFilterUtilities::lookupTransformSafe(), it lookuptransform from "finalTargetFrame"(if we set it as odom), to pose msg.frame_id, what should this frame_id on this topic be? It looks like r_l
thinks this frame is odom, the transform msg work should be done by users before use r_l
, just like viso2_ros?
Generally speaking, the frame_id of pose on this topic is a fixed frame, such as a camera_0 frame(in some moment, camea is launched by its driver ros node). Only when we know what time stamp of camera is launched, we can get from odom frame to this camera_0 frame from tf tree, let we mark this as T_odom_to_camera0
, and then we can transform msg on topic poseX to odom frame, T_odom_to_camera = T_odom_to_camera0 * T(msg_on_poseX)
, T_odom_to_baselink = T_odom_to_camera * T_camera_to_baselink
., which T_odom_to_baselink
is from odom frame to baselink with camera pictures estimated, T_camera_to_baselink
is a tf static transform.
In other words, if robot base node and camera driver node are launched on the same time from start, T_odom_to_camera0
equals to T_baselink_to_camera
,we can get this TF directlly from tf tree. If they does not launched on the same time, we need to record time stamp of camera launched, because we need to record T_odom_to_camera0
, anything wrong??
Currentlly, my idea is:
1: If we set world_frame is map, r_l thinks the default meaning of pose on topic poseX is base_link frame in map frame. The reason is : if the pose on topic poseX is base_link in odom, although with odom topic, we have no sources measuring base_link in map, r_l can not calculate a TF from map--->odom.
2: If we set world_frame is odom, r_l thinks the default meaning of pose on topic poseX is base_link frame in odom frame. r_l publishs a TF from odom--->base_link.
Regardless of which above case, when the poseX topic is provided by camera VO, the transform work including recording the TF between camera0 pose and odom(map), should be done by user before using r_l.
I don't understand what "poseX" is supposed to be
"poseX" is pose0, pose1,..., posen topic of type
geometry_msgs::PoseWithCovarianceStamped
, defined in pose topic callback