Transformation matrix for Pose estimation, change axes

asked 2020-05-13 02:10:57 -0500

Shrutheesh R Iyer gravatar image

updated 2020-05-13 02:11:29 -0500

I am not sure if I have to ask this question in the ROS forum or here. Please direct me, if that is the case.

I am running a Gazebo simulation of a camera, that is placed on top of a movable mount. I am able to obtain the pose of the camera, with respect to the fixed base. However, I noticed that Gazebo (and ROS, as seen on Rviz) uses the following coordinate axes convention.

Front: +x-axis

Top: +z-axis

Left: +y-axis

I am running a mapping algorithm, and by default, most mapping algorithms require the input in the following format.

Front: +z-axis

Top: -y-axis

Right: +x-axis

Consequently, all the camera poses (4x4 matrices) that I obtained, do not sit well with this convention. While it is easy for me to correct my translation values, I am having troubles with the rotation matrix.

Suppose I have the rotation matrix that I obtained from Gazebo, which is a 3x3 matrix, how can I obtain the new rotation matrix in the convention that I require. What is the transformation for the same?

In essence, how can I get the 4x4 camera poses in the convention that the mapping algorithm demands?

edit retag flag offensive close merge delete