ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
point_msg.pose.position.x=cam_model_point[0]
point_msg.pose.position.y=cam_model_point[1]
point_msg.pose.position.z=camera.position.z

Why should the z-coordinate of your point depend on the position of the camera? It just depends on the projected pixel and has nothing to do with your camera pose as it is relative to your camera. z should be 1.

And why do you assign a orientation to your point? It's just a point and not a pose.

point_msg.pose.position.x=cam_model_point[0] point_msg.pose.position.y=cam_model_point[1] point_msg.pose.position.z=camera.position.z

point_msg.pose.position.z=camera.position.z

Why should the z-coordinate of your point depend on the position of the camera? It just depends on the projected pixel and has nothing to do with your camera pose as it is relative to your camera. z should be 1.

And why do you assign a orientation to your point? It's just a point and not a pose.

Edit: Your edit does not make sense. The point is relative to the camera so it's position should not(!) depend on the pose of the camera.