viodom_node.cpp
Go to the documentation of this file.
00001 
00037 #include <ros/ros.h>
00038 #include "stereodom.hpp"
00039 
00040 int main(int argc, char **argv)
00041 {
00042         std::string left_cam, right_cam, imu_topic;
00043         ros::init(argc, argv, "viodom_node");  
00044   
00045         // Read node parameters
00046         ros::NodeHandle lnh("~");
00047         if(!lnh.getParam("left_cam", left_cam))
00048                 left_cam = "/stereo/left";
00049         if(left_cam[left_cam.length()-1] == '/')
00050                 left_cam.erase(left_cam.length()-1, 1);
00051         if(!lnh.getParam("right_cam", right_cam))
00052                 right_cam = "/stereo/right";
00053         if(!lnh.getParam("imu_topic", imu_topic))
00054         imu_topic = "/imu";
00055         if(right_cam[right_cam.length()-1] == '/')
00056                 right_cam.erase(right_cam.length()-1, 1);
00057 
00058         // Visual odometry instance
00059         std::string node_name = "viodom_node";
00060         Stereodom odom(node_name, left_cam, right_cam, imu_topic);
00061         
00062         // Spin for ever
00063         ros::spin();
00064 }


viodom
Author(s): Fernando Caballero , Francisco J. Perez Grau
autogenerated on Thu Jun 6 2019 20:17:02