tum-vision / dvo_slam

Dense Visual Odometry and SLAM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rosmake errors when using g2o::RobustKernelDCS to createRobustKernel

giepy opened this issue · comments

commented

Hi,

I tried to use g2o::RobustKernelDCS to replace g2o::RobustKernelCauchy to createRobustKernel. When I run "rosmake dvo_slam", there were several errors as follows:

make[3]: Entering directory `/home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/build'

[ 31%] Building CXX object CMakeFiles/dvo_slam.dir/src/keyframe_graph.o

/home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/src/keyframe_graph.cpp: In member function ‘g2o::RobustKernel* dvo_slam::internal::KeyframeGraphImpl::createRobustKernel()’:

/home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/src/keyframe_graph.cpp:916:34: error: expected type-specifier

/home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/src/keyframe_graph.cpp:916:34: error: cannot convert ‘ int* ’ to ‘ g2o::RobustKernel* ’ in initialization

/home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/src/keyframe_graph.cpp:916:34: error: expected ‘,’ or ‘;’

make[3]: *** [CMakeFiles/dvo_slam.dir/src/keyframe_graph.o] Error 1
make[3]: Leaving directory /home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/build' make[2]: *** [CMakeFiles/dvo_slam.dir/all] Error 2 make[2]: Leaving directory/home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/islab511/Desktop/ljw_dvo/dvo_slam-fuerte/dvo_slam/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package dvo_slam written to:
[ rosmake ] /home/islab511/.ros/rosmake/rosmake_output-20150604-181250/dvo_slam/build_output.log
[rosmake-2] Finished <<< dvo_slam [FAIL] [ 7.97 seconds ]
[ rosmake ] Halting due to failure in package dvo_slam.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 42 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/islab511/.ros/rosmake/rosmake_output-20150604-181250

And I found that we cannot modify the code of 'g2o'. If I modify the code of 'g2o', in the next compiling the code return to the original. I have no idea with these problem. Please help me!

Thanks.

commented

add the modified createRobustKernel() as follows:
g2o::RobustKernel* createRobustKernel()
{
if(cfg_.UseRobustKernel)
{
//2015-5-23: g2o::RobustKernel Cauchy
//g2o::RobustKernel* k = new g2o::RobustKernelCauchy();
//k->setDelta(5);
g2o::RobustKernel* k = new g2o::RobustKernelDCS();
k->setDelta(5);
return k;
}
else
{
return 0;
}
}
'namespace' had been added in the code. But the problem exists, too. What problem ? What can I do for it ? Is there someone to help me?