Currently, I am trying to use a ZEDm camera (with inertial odometry and visual odometry) as a stereo camera and a laser scan sensor. There are still some loop closure issues with the ZEDm itself but it is manageable for now. However, when I try to integrate with LIDAR, it just spits out this problem
[ WARN] (2019-07-09 17:31:48.165) OccupancyGrid.cpp:357::createLocalMap() Cannot create local map, scan is empty (node=13).
And 3D map and Occupancy Grid does not show up at all in rviz. In rtabmapviz the camera video stream does show up, but does not store the point cloud over time.
The subscribe_scan with stereo_mapping.launch is not working anymore. When synchronizing stereo and laser scan, we force that stereo topics should be pre-synchronized with rgbd_sync nodelet to make sure stereo images are exactly synchronized together before synchronizing with laser scan.
With these parameters, we are getting an issue that says stereo and rgbd should not be subscribed to at the same time and it automatically sets subscribe_stereo to false. Is this related to another error we are getting where we are getting a rejected loop closure and nothing published to /rtabmap/localization_pose when localizing?
No it is not related. It just means it sets subscribe_stereo to false for convenience. rtabmap.launch can do a lot different configurations for convenience, but some cases like that the check of compatibility of parameters is delegated to the nodes.
For the loop closure rejections, the warning is more an informative message than an error, to let us know that a loop closure is rejected (wrongly or not). If the loop closure should be good but rejected, we would need to understand what the message is telling us, then see why it happened.
It seems like /rtabmap/localization_pose is not publishing consistently. Does it only publishes when there is loop closure? Also is that the node we should subscribe to for localization? Sometimes it does not get published for 10 seconds, and it is causing some problems in navigation stack, since the robot does not think it is moving. My last question is what kind of covariance should we expect from rtabmap localization? My autocovariance for one direction is around 0.004m when the robot is static.
The localization_pose is published only on localization/loop closure. The covariance means two things depending in which mode the node is:
* Localization mode: it is the variance of the transform computed
* Mapping mode: it is the marginal covariance of the last node computed after graph optimization
If you want to pose in the map at any time, use TF /map -> /base_link which is always available. localization_pose is not meant to be published continuously, but discretely like a GPS (which can not be always available).