tum-vision / dvo_slam

Dense Visual Odometry and SLAM
632 stars 306 forks source link

Instruction before visualization #5

Open robograffitti opened 10 years ago

robograffitti commented 10 years ago

I'm wondering what to do before the instruction before visualization.

Is there any launch file to bring up dvo_slam?

I found only one launch file in dvo_benchmark, but it does'nt work with the error below: Failed to open '/home/y-tanaka/ros/groovy/dvo_slam/assoc.txt'!

NODES / benchmark (dvo_benchmark/benchmark)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found process[benchmark-1]: started with pid [29567] Failed to open '/home/y-tanaka/ros/groovy/dvo_slam/assoc.txt'! [benchmark-1] process has finished cleanly log file: /home/y-tanaka/.ros/log/d5b103bc-a50b-11e3-a48c-081196ef0060/benchmark-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done

christiankerl commented 10 years ago

The dvo_benchmark package allows to run dvo_slam on datasets, which have the TUM RGB-D benchmark format (see http://vision.in.tum.de/data/datasets/rgbd-dataset/file_formats ). Basically you need a file called assoc.txt which contains a list of RGB-D images. Every line in the file has the following format: timestamp relative/path/to/rgb.png timestamp relative/path/to/depth.png the relative path is resolved with respect to the assoc.txt. You can create such an assoc.txt file with the associate.py script in the rgbd_benchmark_tools (see the website above) from the rgb.txt and depth.txt included in every TUM RGB-D benchmark dataset by running: rosrun rgbd_benchmark_tool associate.py rgb.txt depth.txt > assoc.txt.

Than in the dataset folder run: roslaunch dvo_benchmark benchmark.launch keep_alive:=true Alternatively, you can specify the path to the dataset folder containing an assoc.txt with roslaunch dvo_benchmark benchmark.launch dataset:=/path/to/dataset keep_alive:=true

robograffitti commented 10 years ago

Thanks for the instruction. I finally could build it with hydro and replay the SLAM using the given dataset. However, I can not see anything in rviz after running camera_keyframe_tracker node.

  1. roslaunch openni_launch openni.launch
  2. rosrun dvo_slam camera_keyframe_tracker
  3. rosrun rviz rviz
  4. rosrun rqt_reconfigure rqt_reconfigure
  5. enabled depth_registration, reconstruction, use_weighting, run_dense_tracking, use_dense_tracking_estimate
  6. created interactive marker and point cloud 2 and subscribed /update and /cloud topics (/dvo_vis/update and /dvo_vis/cloud were not found).

I still cannot see any point clouds and camera positions.

christiankerl commented 10 years ago

Have you changed the reference frame to /world?

robograffitti commented 10 years ago

Of course.

Here is what I've done for rviz settings.

image

And, additional info. It seems like /update and /cloud are not working. image

y-tanaka@Penta-W520:~$ rostopic echo /update server_id: /camera_keyframe_tracker seq_num: 0 type: 0 markers: [] poses: [] erases: []

server_id: /camera_keyframe_tracker seq_num: 0 type: 0 markers: [] poses: [] erases: []

y-tanaka@Penta-W520:~$ rostopic echo /cloud header: seq: 776 stamp: secs: 0 nsecs: 0 frame_id: /world height: 1 width: 1 fields:

header: seq: 777 stamp: secs: 0 nsecs: 0 frame_id: /world height: 1 width: 1 fields:

robograffitti commented 10 years ago

I finally succeeded launching dvo_slam with: roslaunch dvo_slam quickstart.launch

But, world tf wasn't published until subscribing some pcl topics published by openni. After doing this, suddenly world tf became available to be selected from the fixed and reference coordinate.

The camera markers still don't work.

christiankerl commented 10 years ago

Can you please post the console output of the quickstart.launch? Have you enabled depth registration in the openni driver? From your Rqt graph plot it looks like camera_keyframe_tracker is not registered to any image topics.

robograffitti commented 10 years ago

Here is my output of the quickstart.launch after enabling depth registration: roslaunch dvo_slam quickstart.launch ... logging to /home/y-tanaka/.ros/log/833e060a-f215-11e3-963f-081196ef0060/roslaunch-Penta-W520-30462.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:44595/

SUMMARY

PARAMETERS

NODES / camera_tracker (dvo_ros/camera_tracker) dynamic_reconfigure (dynamic_reconfigure/reconfigure_gui) rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found process[camera_tracker-1]: started with pid [30480]

[ INFO] [1402566034.099222331]: reconfigured tracker, config ( First Level = 3, Last Level = 1, Max Iterations per Level = 50, Precision = 0.0001, Mu = 0, Use Initial Estimate = true, Use Weighting = true, Scale Estimator = TDistribution, Scale Estimator Param = 5, Influence Function = TDistribution, Influence Function Param = 5, Intensity Derivative Threshold = 0, Depth Derivative Threshold = 0 ) process[dynamic_reconfigure-2]: started with pid [30580] [dynamic_reconfigure-2] process has finished cleanly log file: /home/y-tanaka/.ros/log/833e060a-f215-11e3-963f-081196ef0060/dynamicreconfigure-2.log process[rviz-3]: started with pid [30581] ERROR: the config file '/home/y-tanaka/ros/hydro/src/dvo_slam/dvo_ros/launch/rviz.vcg' is a .vcg file, which is the old rviz config format. New config files have a .rviz extension and use YAML formatting. The format changed between Fuerte and Groovy. There is not (yet) an automated conversion program. [rviz-3] process has died [pid 30581, exit code 1, cmd /opt/ros/hydro/lib/rviz/rviz -d /home/y-tanaka/ros/hydro/src/dvo_slam/dvoros/launch/rviz.vcg name:=rviz log:=/home/y-tanaka/.ros/log/833e060a-f215-11e3-963f-081196ef0060/rviz-3.log]. log file: /home/y-tanaka/.ros/log/833e060a-f215-11e3-963f-081196ef0060/rviz-3.log [ WARN] [1402566039.276075932]: using identity! [ INFO] [1402566039.276167019]: transformation: base_link -> asus 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 [ INFO] [1402566039.277257625]: started camera_tracker... [ WARN] [1402566192.887946774]: RGB image size has changed, resetting tracker! match: 0.0139826 match: 0.0167464 match: 0.0139122 match: 0.0134583 match: 0.0149357 callback: 0.0163006 match: 0.0141767 match: 0.0180311 match: 0.0251642 match: 0.00844 match: 0.00848515 callback: 0.0170086 match: 0.00893842 match: 0.00857904 match: 0.0085968 match: 0.00850189 match: 0.00761215 callback: 0.0110597 match: 0.00808917 match: 0.00839374 match: 0.00845636 match: 0.00837297 match: 0.00853433 callback: 0.0111071

rosgraph

christiankerl commented 10 years ago

hm where do you have the quickstart.launch from, it is not in this repository. if you copied it from the dvo repository it only starts the dvo_ros/camera_tracker but you have to start the dvo_slam/camera_keyframe_tracker to get the SLAM system up and running...

robograffitti commented 10 years ago

I don't have quickstart.launch in dvo_slam. Instead, I was running the one in dvo_ros.

Now, camera_keyframe_tracker still does not show anything in rviz. Do I need some configuration after launching it?

I cannot come up with any idea.

fengyuwuzu commented 9 years ago

I have a similar problem, when I selected the /cloud and /update, I can't see anything in rviz. However, when I add TF in rviz, I can see the robot move. And when I run "rostopic hz cloud" and "rostopic hz update" in shell, the frequency is about 5HZ. Therefore, I don't know why I can't see anything.

lynnsky commented 9 years ago

in the dataset folder run: roslaunch dvo_benchmark benchmark.launch keep_alive:=true,something wrong happened. benchmark: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:69: Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 16>::plain_array() [with T = double, int Size = 16, int MatrixOrArrayOptions = 0]: Assertion `(reinterpret_cast(array) & 0xf) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/TopicUnalignedArrayAssert.html" " \ READ THIS WEB PAGE !!! **"' failed. I cannot come up with any idea.

giepy commented 8 years ago

I have the same problem with you. I cannot see any point clouds and camera positions. Can you help me? There is nothing in rviz. I have no idea. I wander why is the frame_id world not working? Do you have solved this problem?

YuQingL commented 7 years ago

@christiankerl Hi christiankerl , Sorry to bother. I have tried dvo_slam from: https://github.com/songuke/dvo_slam. Now,I finally run the code successfully. But I have a question, dvo_slam is based on TUM RGB-D benchmark to do the test. I would like to ask, dvo_slam can directly use the kinect v2 to generate rgb,depth images and rgb.txt, depth.txt? If so, how to do it?

My OS is Ubuntu 14.04 with ROS Indigo. Can you help me? thanks a lot~

giepy commented 7 years ago

@YuQingL There are two method. The first one is that you can directly run camera_dense_tracking to do realtime test by connecting with kinect camera. The other is that you can obtain the images including rgb images and depth images by kinect camera, and then you can use the ''associate.py'' script which reads the time stamps from the rgb.txt file and the depth.txt file, and joins them by finding the best matches. Then you can run dvo_slam just like you have done.

YuQingL commented 7 years ago

@giepy Thank you for the kindness!