Thanks for all the help so far I really appreciate it, With your guidance I was able to get the ICP odometry working, there was NaN and Inf points that I was able to filter out using a custom cpp node.
Context: I am simulating a differential drive robot with a humanoid torso, the lidar/camera is connected to the head which is connected to the rest of the body with actuators so it can move.
The problem: When moving the robot using its differential drive slowly I am able to map the room but when I try to move the head of the robot that has the lidar attached, I instantly lose my Odom and get the error message:
OdometryF2M.cpp:557::computeTransform() Registration failed: "RegistrationIcp cannot do registration with a null guess."
I'm guessing this is a TF problem? but I'm not exactly sure since the TF seems to update correctly and I can view all the frames moving in rviz.
My lidar is attached to the oak_rgb_camera_frame. I'l also attach my launch file
mapping_sim.py