I get the published objects data from the topic /zed2/zed_node/obj_det/objects (after setting the parameters od_enabled=True in the zed_wrapper/params/zed2.yaml) and it sure gives the detected objects position in the world coordinate frame as the default. However, those position are based on camera reference frame.
Since my zed2 camera is attached to the robot that moves in the world, i need the detected object position based on world reference frame.
In python code, you can specify like this to set it to the reference frame world
Hi Krisna,
object positions are in the world (map) reference frame with the origin in the starting position of the robot, they are not relative to the camera frame.
Hi,
But why are the positions of the detected object changes when I move the camera? Even though the object did not move.
I created a ROS marker object, set the header.frame_id to map, and assign the points of it with the detected object position (in this case person) by the camera.
In RViz, the marker points move as if the object are getting closer to the camera, but what’s happening is the other way around, where the one that actually move is the camera that is getting closer to the object.