Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic reinitialisation when initialisation step fails. #117

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified rqt_svo/CMakeLists.txt
100644 → 100755
Empty file.
Empty file modified rqt_svo/README.md
100644 → 100755
Empty file.
Empty file modified rqt_svo/package.xml
100644 → 100755
Empty file.
Empty file modified rqt_svo/plugin.xml
100644 → 100755
Empty file.
Empty file modified rqt_svo/resource/widget.ui
100644 → 100755
Empty file.
Empty file modified rqt_svo/setup.py
100644 → 100755
Empty file.
Empty file modified rqt_svo/src/rqt_svo/.gitignore
100644 → 100755
Empty file.
Empty file modified rqt_svo/src/rqt_svo/__init__.py
100644 → 100755
Empty file.
Empty file modified rqt_svo/src/rqt_svo/svo.py
100644 → 100755
Empty file.
Empty file modified rqt_svo/src/rqt_svo/svo_widget.py
100644 → 100755
Empty file.
Empty file modified svo/CMakeLists.txt
100644 → 100755
Empty file.
Empty file modified svo/CMakeModules/FindEigen.cmake
100644 → 100755
Empty file.
Empty file modified svo/CMakeModules/FindG2O.cmake
100644 → 100755
Empty file.
Empty file modified svo/Doxyfile
100644 → 100755
Empty file.
Empty file modified svo/doc/.gitignore
100644 → 100755
Empty file.
Empty file modified svo/doc/notation.ipe
100644 → 100755
Empty file.
Empty file modified svo/doc/notation.pdf
100644 → 100755
Empty file.
Empty file modified svo/doc/notation.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified svo/include/svo/bundle_adjustment.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/config.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/depth_filter.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/feature.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/feature_alignment.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/feature_detection.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/frame.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/frame_handler_base.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/frame_handler_mono.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/global.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/initialization.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/map.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/matcher.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/point.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/pose_optimizer.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/reprojector.h
100644 → 100755
Empty file.
Empty file modified svo/include/svo/sparse_img_align.h
100644 → 100755
Empty file.
Empty file modified svo/package.xml
100644 → 100755
Empty file.
Empty file modified svo/src/bundle_adjustment.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/config.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/depth_filter.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/feature_alignment.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/feature_detection.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/frame.cpp
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions svo/src/frame_handler_base.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ int FrameHandlerBase::finishFrameProcessingCommon(
tracking_quality_ = TRACKING_INSUFFICIENT;
}
else if (dropout == RESULT_FAILURE)
{
resetAll();
stage_ = STAGE_RELOCALIZING;
tracking_quality_ = TRACKING_INSUFFICIENT;
}
if(set_reset_)
resetAll();

Expand Down
Empty file modified svo/src/frame_handler_mono.cpp
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions svo/src/initialization.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ InitResult KltHomographyInit::addFirstFrame(FramePtr frame_ref)
{
reset();
detectFeatures(frame_ref, px_ref_, f_ref_);
if(px_ref_.size() < 100)
if(px_ref_.size() < 50)
{
SVO_WARN_STREAM_THROTTLE(2.0, "First image has less than 100 features. Retry in more textured environment.");
SVO_WARN_STREAM_THROTTLE(2.0, "First image has less than 50 features. Retry in more textured environment.");
return FAILURE;
}
frame_ref_ = frame_ref;
Expand Down
Empty file modified svo/src/map.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/matcher.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/point.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/pose_optimizer.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/reprojector.cpp
100644 → 100755
Empty file.
Empty file modified svo/src/sparse_img_align.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/README.md
100644 → 100755
Empty file.
Empty file modified svo/test/benchmark.csv
100644 → 100755
Empty file.
Empty file modified svo/test/data/.gitignore
100644 → 100755
Empty file.
Empty file modified svo/test/results/.gitignore
100644 → 100755
Empty file.
Empty file modified svo/test/test_depth_filter.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/test_feature_alignment.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/test_feature_detection.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/test_matcher.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/test_pipeline.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/test_pose_optimizer.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/test_sparse_img_align.cpp
100644 → 100755
Empty file.
Empty file modified svo/test/test_utils.h
100644 → 100755
Empty file.
Empty file modified svo_analysis/.gitignore
100644 → 100755
Empty file.
Empty file modified svo_analysis/CMakeLists.txt
100644 → 100755
Empty file.
Empty file modified svo_analysis/README.md
100644 → 100755
Empty file.
Empty file modified svo_analysis/comparisons/speed.yaml
100644 → 100755
Empty file.
Empty file modified svo_analysis/comparisons/textures.yaml
100644 → 100755
Empty file.
Empty file modified svo_analysis/experiments/.gitignore
100644 → 100755
Empty file.
Empty file modified svo_analysis/experiments/asl2_acc.yaml
100644 → 100755
Empty file.
Empty file modified svo_analysis/experiments/asl2_fast.yaml
100644 → 100755
Empty file.
Empty file modified svo_analysis/experiments/flying_room_1_fast.yaml
100644 → 100755
Empty file.
Empty file modified svo_analysis/experiments/synthetic.yaml
100644 → 100755
Empty file.
Empty file modified svo_analysis/package.xml
100644 → 100755
Empty file.
Empty file modified svo_analysis/results/.gitignore
100644 → 100755
Empty file.
Empty file modified svo_analysis/setup.py
100644 → 100755
Empty file.
Empty file modified svo_analysis/src/svo_analysis/__init__.py
100644 → 100755
Empty file.
Empty file modified svo_analysis/src/svo_analysis/analyse_dataset.py
100644 → 100755
Empty file.
Empty file modified svo_analysis/src/svo_analysis/filter_groundtruth_smooth.py
100644 → 100755
Empty file.
Empty file modified svo_analysis/src/svo_analysis/hand_eye_calib.py
100644 → 100755
Empty file.
Empty file modified svo_analysis/src/svo_analysis/tum_benchmark_tools/__init__.py
100644 → 100755
Empty file.
Empty file modified svo_msgs/CMakeLists.txt
100644 → 100755
Empty file.
Empty file modified svo_msgs/msg/DenseInput.msg
100644 → 100755
Empty file.
Empty file modified svo_msgs/msg/Feature.msg
100644 → 100755
Empty file.
Empty file modified svo_msgs/msg/Info.msg
100644 → 100755
Empty file.
Empty file modified svo_msgs/msg/NbvTrajectory.msg
100644 → 100755
Empty file.
Empty file modified svo_msgs/package.xml
100644 → 100755
Empty file.
Empty file modified svo_ros/CMakeLists.txt
100644 → 100755
Empty file.
Empty file modified svo_ros/include/svo_ros/dataset_img.h
100644 → 100755
Empty file.
5 changes: 4 additions & 1 deletion svo_ros/include/svo_ros/visualizer.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ class Visualizer
bool publish_map_every_frame_;
ros::Duration publish_points_display_time_;
SE3 T_world_from_vision_;

Matrix3d camera_facing_;

double quality_reading_;//############## stores active slam quality estimation

Visualizer();

~Visualizer() {};
Expand Down
Empty file modified svo_ros/launch/live.launch
100644 → 100755
Empty file.
Empty file modified svo_ros/launch/test_rig3.launch
100644 → 100755
Empty file.
40 changes: 40 additions & 0 deletions svo_ros/launch/testueyeSVO.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<launch>
<arg name="nodelet_manager_name" value="nodelet_manager" />
<arg name="camera_name" value="camera" />

<node pkg="nodelet" type="nodelet" name="$(arg nodelet_manager_name)" args="manager" output="screen" launch-prefix="taskset -c 0"/>

<node pkg="nodelet" type="nodelet" name="ueye_cam_nodelet" args="load ueye_cam/ueye_cam_nodelet $(arg nodelet_manager_name)" launch-prefix="taskset -c 4">

<param name="camera_name" type="str" value="$(arg camera_name)" /> <!-- == namespace for topics and services -->
<param name="camera_topic" type="str" value="image_raw" />
<param name="camera_id" type="int" value="0" /> <!-- 0 = any camera; 1+: camera ID -->

<param name="ext_trigger_mode" type="bool" value="False" />
<param name="color_mode" type="str" value="mono8" /> <!-- valid options: 'rgb8', 'mono8', 'bayer_rggb8' -->

<param name="image_width" type="int" value="752" />
<param name="image_height" type="int" value="480" />

<param name="auto_gain" type="bool" value="False" />
<param name="master_gain" type="int" value="0" />
<param name="gain_boost" type="bool" value="False" />

<param name="auto_exposure" type="bool" value="False" />
<param name="exposure" type="int" value="2" /> <!-- in ms -->

<param name="auto_frame_rate" type="bool" value="False" />
<param name="frame_rate" type="double" value="50.0" />


</node>


<node pkg="svo_ros" type="vo" name="svo" clear_params="true" launch-prefix="taskset -c 4">
<param name="cam_topic" value="/camera/image_raw" type="str" />
<rosparam file="$(find svo_ros)/param/ueyeIR_atan.yaml" />
<rosparam file="$(find svo_ros)/param/vo_mine.yaml" />
<param name="accept_console_user_input" value="true" />
<param name="publish_world_in_cam_frame" value="false" />
<param name="init_rx" value="3.14159265" />
</node>
Empty file modified svo_ros/package.xml
100644 → 100755
Empty file.
8 changes: 8 additions & 0 deletions svo_ros/param/VO2701_atan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cam_model: ATAN
cam_width: 640
cam_height: 480
cam_fx: 0.4425
cam_fy: 0.691
cam_cx: 0.5052
cam_cy: 0.4578
cam_d0: 0.9645
12 changes: 6 additions & 6 deletions svo_ros/param/camera_atan.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cam_model: ATAN
cam_width: 752
cam_width: 640
cam_height: 480
cam_fx: 0.509326
cam_fy: 0.796651
cam_cx: 0.45905
cam_cy: 0.510056
cam_d0: 0.9320
cam_fx: 1.06326
cam_fy: 1.41474
cam_cx: 0.488711
cam_cy: 0.478752
cam_d0: 0.171631
18 changes: 9 additions & 9 deletions svo_ros/param/camera_pinhole.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cam_model: Pinhole
cam_width: 752
cam_width: 640
cam_height: 480
cam_fx: 414.536145
cam_fy: 414.284429
cam_cx: 348.804988
cam_cy: 240.076451
cam_d0: -0.283076
cam_d1: 0.066674
cam_d2: 0.000896
cam_d3: 0.000778
cam_fx: 676.7234
cam_fy: 674.9319
cam_cx: 316.3583
cam_cy: 226.1596
cam_d0: 0.1317
cam_d1: -0.9365
cam_d2: 0.00011586
cam_d3: 0.0032
9 changes: 9 additions & 0 deletions svo_ros/param/ueyeIR_atan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cam_model: ATAN
cam_width: 752
cam_height: 480
cam_fx: 0.451172
cam_fy: 0.70574
cam_cx: 0.500868
cam_cy: 0.452328
cam_d0: 0.966227

8 changes: 8 additions & 0 deletions svo_ros/param/ueye_atan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cam_model: ATAN
cam_width: 752
cam_height: 480
cam_fx: 0.4425
cam_fy: 0.691
cam_cx: 0.5052
cam_cy: 0.4578
cam_d0: 0.9645
Empty file modified svo_ros/param/vo_accurate.yaml
100644 → 100755
Empty file.
9 changes: 8 additions & 1 deletion svo_ros/param/vo_fast.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
grid_size: 30
max_n_kfs: 10
loba_num_iter: 0
loba_num_iter: 0

init_min_disparity: 30
init_min_tracked: 35
init_min_inliers: 20
triang_min_corner_score: 10.0
quality_min_fts: 30
quality_max_drop_fts: 50
16 changes: 16 additions & 0 deletions svo_ros/param/vo_mine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
grid_size: 30
max_n_kfs: 10
loba_num_iter: 0
n_pyr_levels: 5

init_min_disparity: 30
init_min_tracked: 35
init_min_inliers: 20

max_fts: 250
triang_min_corner_score: 5.0
quality_min_fts: 30
quality_max_drop_fts: 130

structureoptim_max_pts: 30
structureoptim_num_iter: 5
4 changes: 4 additions & 0 deletions svo_ros/param/vo_px4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
grid_size: 30
max_n_kfs: 10
loba_num_iter: 0
max_fts: 180
Empty file modified svo_ros/rqt.perspective
100644 → 100755
Empty file.
Empty file modified svo_ros/rviz_config.rviz
100644 → 100755
Empty file.
Empty file modified svo_ros/src/benchmark_node.cpp
100644 → 100755
Empty file.
27 changes: 18 additions & 9 deletions svo_ros/src/visualizer.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ Visualizer() :
publish_world_in_cam_frame_(vk::getParam<bool>("svo/publish_world_in_cam_frame", true)),
publish_map_every_frame_(vk::getParam<bool>("svo/publish_map_every_frame", false)),
publish_points_display_time_(vk::getParam<double>("svo/publish_point_display_time", 0)),
T_world_from_vision_(Matrix3d::Identity(), Vector3d::Zero())
T_world_from_vision_(Matrix3d::Identity(), Vector3d::Zero()),
quality_reading_(0.006)
{
// Init ROS Marker Publishers
pub_frames_ = pnh_.advertise<visualization_msgs::Marker>("keyframes", 10);
pub_points_ = pnh_.advertise<visualization_msgs::Marker>("points", 1000);
pub_pose_ = pnh_.advertise<geometry_msgs::PoseWithCovarianceStamped>("pose",10);
pub_pose_ = pnh_.advertise<geometry_msgs::PoseWithCovarianceStamped>("pose",1);
pub_info_ = pnh_.advertise<svo_msgs::Info>("info", 10);
pub_dense_ = pnh_.advertise<svo_msgs::DenseInput>("dense_input",10);

Expand Down Expand Up @@ -82,13 +83,16 @@ void Visualizer::publishMinimal(
msg_info.keyframes.resize(slam.map().keyframes_.size());
for(list<FramePtr>::const_iterator it=slam.map().keyframes_.begin(); it!=slam.map().keyframes_.end(); ++it)
msg_info.keyframes.push_back((*it)->id_);

msg_info.stage = static_cast<int>(slam.stage());
msg_info.tracking_quality = static_cast<int>(slam.trackingQuality());

if(frame != NULL)
msg_info.num_matches = slam.lastNumObservations();
else
msg_info.num_matches = 0;
pub_info_.publish(msg_info);

}

if(frame == NULL)
Expand Down Expand Up @@ -178,7 +182,8 @@ void Visualizer::publishMinimal(
{
// publish cam in world frame
SE3 T_world_from_cam(T_world_from_vision_*frame->T_f_w_.inverse());
q = Quaterniond(T_world_from_cam.rotation_matrix()*T_world_from_vision_.rotation_matrix().transpose());
//q = Quaterniond(T_world_from_cam.rotation_matrix()*T_world_from_vision_.rotation_matrix().transpose());
q = Quaterniond(T_world_from_cam.rotation_matrix() * camera_facing_.transpose());//#####################here remember to derotate the camera facing
p = T_world_from_cam.translation();
Cov = T_world_from_cam.Adj()*frame->Cov_*T_world_from_cam.inverse().Adj();
}
Expand All @@ -204,19 +209,20 @@ void Visualizer::visualizeMarkers(
{
if(frame == NULL)
return;

// Publish /tf
vk::output_helper::publishTfTransform(
frame->T_f_w_*T_world_from_vision_.inverse(),
ros::Time(frame->timestamp_), "cam_pos", "world", br_);


// Publish markers
if(pub_frames_.getNumSubscribers() > 0 || pub_points_.getNumSubscribers() > 0)
{
vk::output_helper::publishCameraMarker(
vk::output_helper::publishHexacopterMarker(
pub_frames_, "cam_pos", "cams", ros::Time(frame->timestamp_),
1, 0.3, Vector3d(0.,0.,1.));
1, 0, 0.3, Vector3d(0.,0.,1.));
vk::output_helper::publishPointMarker(
pub_points_, T_world_from_vision_*frame->pos(), "trajectory",
ros::Time::now(), trace_id_, 0, 0.006, Vector3d(0.,0.,0.5));
ros::Time::now(), trace_id_, 0, quality_reading_, Vector3d(0.,0.,0.5)); //###########
if(frame->isKeyframe() || publish_map_every_frame_)
publishMapRegion(core_kfs);
removeDeletedPts(map);
Expand All @@ -242,6 +248,8 @@ void Visualizer::removeDeletedPts(const Map& map)
}
}


// feature map!!!!!!!!!!!!!!!
void Visualizer::displayKeyframeWithMps(const FramePtr& frame, int ts)
{
// publish keyframe
Expand All @@ -261,12 +269,13 @@ void Visualizer::displayKeyframeWithMps(const FramePtr& frame, int ts)

vk::output_helper::publishPointMarker(
pub_points_, T_world_from_vision_*(*it)->point->pos_, "pts",
ros::Time::now(), (*it)->point->id_, 0, 0.005, Vector3d(1.0, 0., 1.0),
ros::Time::now(), (*it)->point->id_, 0, 0.02, Vector3d(1.0, 0., 1.0),
publish_points_display_time_);
(*it)->point->last_published_ts_ = ts;
}
}


void Visualizer::exportToDense(const FramePtr& frame)
{
// publish air_ground_msgs
Expand Down
66 changes: 57 additions & 9 deletions svo_ros/src/vo_node.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
#include <vikit/camera_loader.h>
#include <vikit/user_input_thread.h>

#include <geometry_msgs/TransformStamped.h>//#####################################3
#include <std_msgs/Bool.h>//#####################
#include <math.h>

namespace svo {

/// SVO Interface
Expand All @@ -55,6 +59,12 @@ class VoNode
void imgCb(const sensor_msgs::ImageConstPtr& msg);
void processUserActions();
void remoteKeyCb(const std_msgs::StringConstPtr& key_input);
void resetCallback(const geometry_msgs::TransformStamped::ConstPtr& msgin);//############################

ros::Subscriber sub_quality_;
void qualityCallback(const geometry_msgs::Vector3& msgin); // receive message from active slam

ros::Publisher pub_usereset_;
};

VoNode::VoNode() :
Expand All @@ -74,14 +84,16 @@ VoNode::VoNode() :
throw std::runtime_error("Camera model not correctly specified.");

// Get initial position and orientation
visualizer_.camera_facing_ = vk::rpy2dcm(Vector3d(vk::getParam<double>("svo/init_rx", 0.0),
vk::getParam<double>("svo/init_ry", 0.0),
vk::getParam<double>("svo/init_rz", 0.0))); // #############log the camera setup (downward facing)
visualizer_.T_world_from_vision_ = Sophus::SE3(
vk::rpy2dcm(Vector3d(vk::getParam<double>("svo/init_rx", 0.0),
vk::getParam<double>("svo/init_ry", 0.0),
vk::getParam<double>("svo/init_rz", 0.0))),
visualizer_.camera_facing_,
Eigen::Vector3d(vk::getParam<double>("svo/init_tx", 0.0),
vk::getParam<double>("svo/init_ty", 0.0),
vk::getParam<double>("svo/init_tz", 0.0)));


// Init VO and start
vo_ = new svo::FrameHandlerMono(cam_);
vo_->start();
Expand Down Expand Up @@ -140,20 +152,53 @@ void VoNode::processUserActions()
printf("SVO user input: RESET\n");
break;
case 's':
vo_->start();
pub_usereset_.publish(1);
//vo_->start();
printf("SVO user input: START\n");
break;
default: ;
}
}

// reset call back here!!####
void VoNode::remoteKeyCb(const std_msgs::StringConstPtr& key_input)
{
remote_input_ = key_input->data;
}

//______________________________###############################################
// Filter reset callback function
//void VoNode::resetCallback(const std_msgs::Bool::ConstPtr& msgin)
void VoNode::resetCallback(const geometry_msgs::TransformStamped::ConstPtr& msgin)
{
visualizer_.T_world_from_vision_ = Sophus::SE3(
vk::quat2dcm(Vector4d((double)msgin->transform.rotation.w,
(double)msgin->transform.rotation.x,
(double)msgin->transform.rotation.y,
(double)msgin->transform.rotation.z)) * visualizer_.camera_facing_,
Eigen::Vector3d((double)msgin->transform.translation.x,
(double)msgin->transform.translation.y,
(double)msgin->transform.translation.z));
vo_->start();
printf("SVO user input: START\n");
}

//__________________________________#####################
// active slam quality message
void VoNode::qualityCallback(const geometry_msgs::Vector3& msgin)
{
if (msgin.x > 0.001) return;
visualizer_.quality_reading_ = msgin.x*700.0;
std::cout << "The scaled quality is" << visualizer_.quality_reading_ << std::endl;
}

} // namespace svo



//_________________________
// MIAN
//_____________________________
int main(int argc, char **argv)
{
ros::init(argc, argv, "svo");
Expand All @@ -164,11 +209,14 @@ int main(int argc, char **argv)
// subscribe to cam msgs
std::string cam_topic(vk::getParam<std::string>("svo/cam_topic", "camera/image_raw"));
image_transport::ImageTransport it(nh);
image_transport::Subscriber it_sub = it.subscribe(cam_topic, 5, &svo::VoNode::imgCb, &vo_node);

// subscribe to remote input
vo_node.sub_remote_key_ = nh.subscribe("svo/remote_key", 5, &svo::VoNode::remoteKeyCb, &vo_node);

image_transport::Subscriber it_sub = it.subscribe(cam_topic, 1, &svo::VoNode::imgCb, &vo_node);

// subscribe to remote input#######################################################
//vo_node.sub_remote_key_ = nh.subscribe("svo/remote_key", 5, &svo::VoNode::remoteKeyCb, &vo_node);
vo_node.sub_remote_key_ = nh.subscribe("Allreset", 10, &svo::VoNode::resetCallback, &vo_node);
vo_node.pub_usereset_ = nh.advertise<std_msgs::Bool>("svo/usereset", 10);;
vo_node.sub_quality_ = nh.subscribe("aslam/quality", 100, &svo::VoNode::qualityCallback, &vo_node);

// start processing callbacks
while(ros::ok() && !vo_node.quit_)
{
Expand Down