3D coordinates of depth camera
Hi! I spawned some blue colored balls in gazebo using specific XYZ coordinates. But when I try to get the coordinates of the balls using the depth camera, I'm unable to get the same coordinates which I used to spawn the balls. Can anyone let me know why this happens?
Thanks!
Please add more details. What is the command you use to spawn the balls and how do you get the position from the depth camera? My first guess would be a wrong tf tree, but can't be sure without details.
Hi! I'm using a python script to spawn the balls and I'm using object detection approach and point cloud to measure the XYZ coordinates of the object.
With "more details" I meant a full description on what to do to reproduce your problem, see for example how much details this question has.
Hi Thanks for your response! Actually I'm not able to disclose more details about the project. But I have a query. When I spawn an object at a particular XYZ coordinate with respect to Gazebo, And using the depth camera I'm getting the XYZ of the spawned object. Both the XYZ coordinates will never be the same. Am I correct? Kindly let me know.
The positions should be equal, given the origin of the coordinate system is the same.
But I'm spawning the object W.R.T gazebo frame and getting the coordinates W.R.T depth camera frame. How it can be equal?
See my previous comment: Only if the origin is of the coordinate system is the same. (Sorry if was unclear, I'm not a native English speaker)
This is the first time I read that you get the coordinates in the frame of the depth camera btw. That is the job of tf to transform the coordinates in the frame of the depth camera into the world frame.