I’m using an Intel RealSense D435 camera with ROS2 Jazzy and MoveIt2. My camera is mounted in a non-standard orientation: Vertically rather than horizontally. More specifically it is rotated 90° counterclockwise (USB port facing up) and tilted 8° downward.
I’ve set up my URDF with a camera_link joint that connects to my robot, and the RealSense ROS2 driver automatically publishes the camera_depth_optical_frame.
My questions:
Does camera_link need to follow a specific orientation convention? (I’ve read REP-103 says X=forward, Y=left, Z=up, but does this still apply when the camera is physically rotated?)
What should camera_depth_optical_frame look like in RViz after the 90° rotation? The driver creates this automatically - should I expect the axes to look different than a standard horizontal mount?
If my point cloud visually appears correctly aligned with reality (floor is horizontal, objects in correct positions), does the TF frame orientation actually matter? Or is it purely cosmetic at that point?
Is there a “correct” RPY for a vertically-mounted D435, or do I just need to ensure the point cloud aligns with my robot’s world frame?
Any guidance from anyone who has mounted a RealSense camera vertically would be really appreciated!
I don’t think you need to do anything extra. Just connect the camera to base_link via the 90°/8° fixed link and that’s it. The forward-left-up convention is relative to the base link of the camera itself in this case (so left in camera base frame would be down in robot frame, but that’s no problem).
A different case would be if the image were rotated after being captured (e.g. upside down and flipped, which corresponds to 180° rotation). In such case, the geometric frame should be left as is, but the optical frame should contain this transformation. However, I haven’t seen this implemented anywhere yet. But it logically stems from everything I’ve seen. I wrote about this a little bit more here: Add ROS parameters for configuring GZ to ROS optical frame conversion by iche033 · Pull Request #703 · gazebosim/ros_gz · GitHub .
Thanks for the response I will definitely check out your link! I was able to correctly orient the camera footage (displayed using PointCloud2 in rviz) when altering/rotating the rpy of my camera_link in the URDF. However, I’m not sure if this has any correlation or could be due to another issue, but the camera footage appears to be off. The table is higher up and farther away in sim, different than what it is in real life. I also noticed that my house vents in the far distance in real life are perfectly horizontal but in sim appear to be going down on a slope from left to right. I’m not sure why this could be. I’m wondering if it even has anything to do with the customized RPY in my URDF, or any data and calibration issues as I’m not sure how to exactly calibrate the camera correctly. Do you have any suggestions on tutorials or documentation that could help me properly calibrate and setup my realsesne d435 to ensure complete exact accuracy in real life + sim? Thanks so much for the response!