
[FATAL] (2016-06-27 21:10:57.898) Odometry.cpp:205::process() Condition (dt>0.0 || (dt == 0.0 && previousVelocityTransform_.isNull())) not met!
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2016-06-27 21:10:57.898) Odometry.cpp:205::process() Condition (dt>0.0 || (dt == 0.0 && previousVelocityTransform_.isNull())) not met!
[ WARN] [1467054658.064520998]: rtabmap: Could not get transform from odom to base_footprint after 0.200000 seconds (for stamp=1467054657.806996)!
[rtabmap/stereo_odometry-4] process has died [pid 5163, exit code -6, cmd /home/arun/Workspace/catkin/devel/lib/rtabmap_ros/stereo_odometry left/image_rect:=/stereo_camera/left/image_rect right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info odom:=/stereo_odometry __name:=stereo_odometry __log:=/home/arun/.ros/log/50bce738-3c95-11e6-9609-ecf4bb684ae6/rtabmap-stereo_odometry-4.log].
log file: /home/arun/.ros/log/50bce738-3c95-11e6-9609-ecf4bb684ae6/rtabmap-stereo_odometry-4*.log
[ WARN] [1467054658.266325082]: rtabmap: Could not get transform from base_footprint to /left after 0.200000 seconds (for stamp=1467054657.806996)!

How to get rid of this error and get the odometry as well as map?

many thanks of support.
```


```
<issue_comment>username_1: It is like a new frame is received with a timestamp smaller than the previously processed frame. Looking again the [ueye code](https://bitbucket.org/kmhallen/ueye/src/91d7a3ce87fc594e2be02ccfc168145b21172c15/src/StereoNode.cpp?at=default&fileviewer=file-view-default#StereoNode.cpp-475:505), it seems they set the same timestamp between the left and right images, but not sure if the published frames are correctly ordered.

If you are building rtabmap from source, I [just added](https://github.com/introlab/rtabmap/commit/756e1768789b36012e9985d5d580713bb312e4ca) more info in the assert condition so we will see if `dt` is really negative. If so, it will mean that frames received are not ordered.

To debug, you could show the timestamps of the published left image and see if there is a problem with the stamps when stereo_odometry asserts:
```
$ rostopic echo /stereo_camera/left/image_rect_color/header/stamp
```
<issue_comment>username_0: Here is the output of 
`rostopic echo /stereo_camera/left/image_rect_color/header/stamp`
```
secs: 1467103469
nsecs: 264570371
---
secs: 1467103469
nsecs: 264570371
---
secs: 1467103469
nsecs: 264570371
```

`rostopic echo /stereo_camera/right/image_rect_color/header/stamp`
```
secs: 1467103469
nsecs: 264570371
---
secs: 1467103469
nsecs: 264570371
---
secs: 1467103469
nsecs: 264570371
---

```
do you recommend to upgrade the standalone library (rtabmap) and try the same?
<issue_comment>username_0: Now, i changed my settings like distance between the camera,framerate,exposure time and i recalibrated again.Also upgraded the standalone libraries. i can see the odometry for slow movements and still needs to check if the camera is moving constantly.
But i'm not getting the map data in rviz.
since there is no tf for /map to /left (camera).I tried like this
`rosrun tf static_transform_publisher 0 0 0 0 0 0 map left 100`
It is not working and i'm not getting any map data.

I need the /rtabmap/cloud_map in rviz.
any suggestions?
<issue_comment>username_1: /map -> /odom will be published by rtabmap (once it can get odometry computed), and odometry will publish /odom -> /base_footprint (once it can compute odometry). I think `dt` is not negative, it is just 0 because the left timestamps can be identical for some time. Odometry assume always that new frame has a timstamp higher than the previous frame, otherwise odometry cannot be computed (velocity could not be estimated).

You don't need to get latest rtabmap source, I think it is the timestamp the problem. In [ueye code](https://bitbucket.org/kmhallen/ueye/src/91d7a3ce87fc594e2be02ccfc168145b21172c15/src/StereoNode.cpp?at=default&fileviewer=file-view-default#StereoNode.cpp-475:505), instead of:
```cpp
// Timestamp and publish the image. Called by the streaming thread.
void StereoNode::publishImageL(const char *frame, size_t size)
{
  ros::Time stamp = ros::Time::now();
  boost::lock_guard<boost::mutex> lock(mutex_);
  l_stamp_ = stamp;
  double diff = (l_stamp_ - r_stamp_).toSec();
  if ((diff >= 0) && (diff < 0.02)) {
    l_msg_camera_info_.header.stamp = r_msg_camera_info_.header.stamp;
  } else {
    l_msg_camera_info_.header.stamp = l_stamp_;
  }
  sensor_msgs::CameraInfoPtr info;
  sensor_msgs::ImagePtr img = processFrame(frame, size, l_cam_, info, l_msg_camera_info_);
  l_pub_stream_.publish(img, info);
}
void StereoNode::publishImageR(const char *frame, size_t size)
{
  ros::Time stamp = ros::Time::now();
  boost::lock_guard<boost::mutex> lock(mutex_);
  r_stamp_ = stamp;
  double diff = (r_stamp_ - l_stamp_).toSec();
  if ((diff >= 0) && (diff < 0.02)) {
    r_msg_camera_info_.header.stamp = l_msg_camera_info_.header.stamp;
  } else {
    r_msg_camera_info_.header.stamp = r_stamp_;
  }
  sensor_msgs::CameraInfoPtr info;
  sensor_msgs::ImagePtr img = processFrame(frame, size, r_cam_, info, r_msg_camera_info_);
  r_pub_stream_.publish(img, info);
}
```

do:
```cpp
// Timestamp and publish the image. Called by the streaming thread.
void StereoNode::publishImageL(const char *frame, size_t size)
{
  l_msg_camera_info_.header.stamp = ros::Time::now();
  sensor_msgs::CameraInfoPtr info;
  sensor_msgs::ImagePtr img = processFrame(frame, size, l_cam_, info, l_msg_camera_info_);
  l_pub_stream_.publish(img, info);
}
void StereoNode::publishImageR(const char *frame, size_t size)
{
  r_msg_camera_info_.header.stamp = ros::Time::now();
  sensor_msgs::CameraInfoPtr info;
  sensor_msgs::ImagePtr img