ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It looks like a piece of code out of a visual Odometry Node. The function receives an image, and publishes the Odometry output using a global publisher object.

The code which is in comment

vo->on_image(&image->data[0], (image->encoding == "bgr8" ? false : true), image->width, image->height, &odom_output.twist.twist.linear.x, &odom_output.twist.twist.angular.z);

is a global VO class that receives:

  1. The image
  2. Bool encodedFlag
  3. Int imageWidth
  4. Int imageHeight
  5. Float *linearSpeedOutput
  6. Float *angularSpeedOutput The outputs are stored into the odom_output message variable, which is of type nav_msgs::Odometry. Also added to the message is the stamp of which the image was taken and a sequence value.