Closed mayshukla closed 4 years ago
For the simulator, this will involve calling the reset_odom
service and/or the set_odom_to_pose
service of the visual odometry node. This node is created in spear_simulator/launch/rtabmap.launch. See documentation here:
http://wiki.ros.org/rtabmap_ros#Visual_and_Lidar_Odometry
For the rover, we are not using rtabmap odometry. Instead the zed camera has its own visual odometry node. This will probably be the set_initial_pose
and/or the restart_tracking
services. See spear_rover/launch/zed.launch
https://www.stereolabs.com/docs/ros/zed_node/#services
Also, we will need to remove the line <param name="Odom/ResetCountdown" value="1"/>
from spear_simulator/launch/rtabmap.launch. This param causes the odometry to be automatically reset to zero when lost for more than 1 second. Since we are doing this in our node, this is redundant.
Changes to localization make this unnecessary for now, but might need later if something changes again
This node should take a parameter which is the name of the service to call to reset odometry (this is different on the zed camera vs. the simulator).
The node should detect when visual odometry has been lost for over a certain period of time (ideally set through another param) and call the reset service. Once, odometry is reset, it should set the pose to the last pose before odometry was reset.
This allows us to use visual odometry for absolute position in the ekf while still being able to recover from visual odometry becoming lost.