Posted by
Manuelo247 on
URL: http://official-rtab-map-forum.206.s1.nabble.com/cv-Exception-Airsim-implementation-tp10281p10409.html
I removed the static TF line, which I had added because there was a message indicating no connection between them. Instead, I changed the world name from world_ned to map, so I no longer see an error related to that.
As for the scale, there's no issue; it's the world's scale, so I'm not concerned about it.
Regarding the TF tree, I had to add some rotations to the camera to visualize it correctly because otherwise, the point cloud projection would move erratically. However, I couldn't fix the issue of it being upside down, so I added a rotation to drone_1 to correct this and ensure the projection looked right. Could this be causing problems? Here are the lines I added:
"front_left_custom_optical"
cam_tf_body_msg.transform.rotation.x = img_response.camera_orientation.x();
cam_tf_body_msg.transform.rotation.y = img_response.camera_orientation.y();
cam_tf_body_msg.transform.rotation.z = img_response.camera_orientation.z();
cam_tf_body_msg.transform.rotation.w = img_response.camera_orientation.w();
tf2::Quaternion quat_cam_body;
tf2::convert(cam_tf_body_msg.transform.rotation, quat_cam_body);
tf2::Quaternion additional_rotation;
additional_rotation.setRPY(-1.57, 3.14, -1.57);
tf2::Quaternion final_rotation = quat_cam_body * additional_rotation;
cam_tf_body_msg.transform.rotation.x = final_rotation.x();
cam_tf_body_msg.transform.rotation.y = final_rotation.y();
cam_tf_body_msg.transform.rotation.z = final_rotation.z();
cam_tf_body_msg.transform.rotation.w = final_rotation.w();
"drone_1"
vehicle_tf_msg.transform.translation.x = vehicle_setting.position.x();
vehicle_tf_msg.transform.translation.y = vehicle_setting.position.y();
vehicle_tf_msg.transform.translation.z = vehicle_setting.position.z();
tf2::Quaternion quat;
quat.setRPY(3.14, 0, 0);
vehicle_tf_msg.transform.rotation.x = quat.x();
vehicle_tf_msg.transform.rotation.y = quat.y();
vehicle_tf_msg.transform.rotation.z = quat.z();
vehicle_tf_msg.transform.rotation.w = quat.w();
I no longer have many visible errors in the terminal, just the ones that were already appearing before.
[ WARN] (2024-09-02 07:33:13.761) util3d.cpp:606::cloudFromDepthRGB() Cloud with only NaN values created!
[ WARN] (2024-09-02 07:33:13.871) Rtabmap.cpp:2796::process() Ignoring local loop closure with 73 because resulting transform is too large!? (53.385418m > 1.000000m)
[ WARN] (2024-09-02 07:33:13.918) Rtabmap.cpp:4560::process() Republishing data of requested node(s) 73 23 (Rtabmap/MaxRepublished=2)
Despite all this, I don't see RTAB-Map publishing anything, even though messages are being published to the topics and RViz is reading those messages. Also, RViz shows that a map is being generated, but as I mentioned, I'm not seeing anything that's being generated.

Here is the
rosbag.