srv / stereo_slam

Other
132 stars 64 forks source link

Impossible to compile in Indigo #4

Closed solosito closed 9 years ago

solosito commented 9 years ago

Would be possible to upload a complete and working Indigo packet? I've tried doing a lot of changes and correcting one by one the errors that I found while compiling, but it is not possible to fix it at all.

My brain is goint to explode.

Thank you in advance.

miquelmassot commented 9 years ago

Hi @solosito! Could you please tell us which branch are you using?

solosito commented 9 years ago

Hi @miquelmassot

I am able to make "roslaunch stereo_slam stereo.launch" and can see in rviz the raw video from the stereo.bag file, but no odometry or pointcloud is published (the topics exists but without info).

miquelmassot commented 9 years ago

In order to help you, I first need to know which branch you are using. After that, I'd like to see your launchfile.

solosito commented 9 years ago

Yes, sorry. It's Indigo

And the stereo.launch is this one (with the launch oppening and closing, but isn't displayed in this message, dunno why).

<!--Setup Bagfile-->
<arg name="bagfile" default="/home/atroya/stereo_img_workspace/src/stereo_slam/bag/stereo.bag"/>

<!--Setup Camera-->
<arg name="camera" default="/camera_comp_wide/" />
<param name="/use_sim_time" value="true"/>

<!--Play Bagfile-->
<node pkg="rosbag" type="play" name="rosbag" args="--clock $(arg bagfile)"/>

<!-- Run the stereo image proc -->
<node ns="$(arg camera)" pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc" />

<include file="$(find stereo_slam)/launch/modules/stereo_crop_decimate.launch" >
    <arg name="stereo" value="$(arg camera)" />
</include>

<node ns="$(arg camera)/scaled" pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc" >
</node>

<node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer">
    <remap from="stereo" to="$(arg camera)"/>
    <remap from="image" to="image_rect"/>
    <param name="base_link_frame_id" value="$(arg camera)"/>
</node>

<!-- Stereo SLAM -->
<node pkg="stereo_slam" type="localization" name="stereo_slam" output="screen">

  <!-- Working directory -->
  <param name="work_dir" value="/home/atroya/stereo_img_workspace/src/stereo_slam/data" />

  <param name="odom_topic" value="/stereo_odometer/odometry" />
  <param name="camera_topic" value="$(arg camera)" />

</node>
plnegre commented 9 years ago

Hello @solosito,

First: is viso2 publishing the odometry (rostopic echo /stereo_odometer/odometry).

Second: You are scaling the images but not using them. If your images have a big resolution it is better to use the scaled images for viso2 and stereo_slam, so change:

<remap from="stereo" to="$(arg camera)"/>     to      <remap from="stereo" to="$(arg camera)/scaled"/>

and

<param name="camera_topic" value="$(arg camera)" />     to      <param name="camera_topic" value="$(arg camera)/scaled"/>
solosito commented 9 years ago

Hi @plnegre,

First: No, viso2 isn't publishing it.

Second: What do I have to change? Don't understand what you mean.

miquelmassot commented 9 years ago

Then the issue is within viso2. Are you using ours? https://github.com/srv/viso2 Can you post here a "rosbag info" of your stereo.bag?

solosito commented 9 years ago

I am experiencing some problems when compiling using your viso2:

catkin_make
[ 26%] Building C object libvlfeat/CMakeFiles/vlfeat.dir/vlfeat/vl/kmeans.c.o
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp: In function ‘void printtriangle(mesh*, behavior*, otri*)’:
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1423:19: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
          t->orient);
                   ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1429:27: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
            printtri.orient);
                           ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1436:27: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
            printtri.orient);
                           ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1443:27: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
            printtri.orient);
                           ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1452:42: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
            printvertex[0], printvertex[1]);
                                          ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1459:42: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
            printvertex[0], printvertex[1]);
                                          ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1466:42: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
            printvertex[0], printvertex[1]);
                                          ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1472:30: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
              printsh.ssorient);
                              ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1477:30: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
              printsh.ssorient);
                              ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1482:30: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
              printsh.ssorient);
                              ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp: In function ‘void printsubseg(mesh*, behavior*, osub*)’:
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1509:59: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
          (unsigned long long) s->ss, s->ssorient, mark(*s));
                                                           ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1515:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
            printsh.ssorient);
                            ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1522:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
            printsh.ssorient);
                            ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1531:42: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
            printvertex[0], printvertex[1]);
                                          ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1538:42: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
            printvertex[0], printvertex[1]);
                                          ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1545:27: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
            printtri.orient);
                           ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1552:27: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]
            printtri.orient);
                           ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1561:42: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
            printvertex[0], printvertex[1]);
                                          ^
/home/atroya/stereo_img_workspace/src/viso2/libviso2/libviso2/src/triangle.cpp:1568:42: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
            printvertex[0], printvertex[1]);
                                          ^

...

[ 64%] Building CXX object image_pipeline/depth_image_proc/CMakeFiles/depth_image_proc.dir/src/nodelets/point_cloud_xyzi.cpp.o
/home/atroya/stereo_img_workspace/src/stereo_slam/src/reconstruction/save_clouds.cpp:19:36: fatal error: stereo_slam/GraphPoses.h: No such file or directory
 #include "stereo_slam/GraphPoses.h"
                                    ^
compilation terminated.

...

Scanning dependencies of target remote_exec_srv
[ 84%] Building CXX object libhaloc/CMakeFiles/remote_exec_srv.dir/tools/remote_exec_srv.cpp.o
Preprocessed source stored into /tmp/ccQWf7OK.out file, please attach this to your bugreport.
[ 84%] Built target stereo_slam_gencpp
[ 84%] Built target stereo_slam_generate_messages
make[2]: *** [stereo_slam/CMakeFiles/save_clouds.dir/src/reconstruction/save_clouds.cpp.o] Error 1
make[1]: *** [stereo_slam/CMakeFiles/save_clouds.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 84%] Built target viso2_ros_gencpp
Linking CXX executable /home/atroya/stereo_img_workspace/devel/lib/libhaloc/mono
Linking CXX executable /home/atroya/stereo_img_workspace/devel/lib/libhaloc/remote_exec_srv
[ 84%] Built target mono
[ 84%] Built target remote_exec_srv
Linking CXX shared library /home/atroya/stereo_img_workspace/devel/lib/libimage_proc.so
[ 84%] Built target image_proc
Linking CXX executable /home/atroya/stereo_img_workspace/devel/lib/libhaloc/evaluation
[ 84%] Built target evaluation
Linking CXX shared library /home/atroya/stereo_img_workspace/devel/lib/libimage_rotate.so
[ 84%] Built target image_rotate
Linking CXX shared library /home/atroya/stereo_img_workspace/devel/lib/libdepth_image_proc.so
[ 84%] Built target depth_image_proc
make: *** [all] Error 2
Invoking "make -j8 -l8" failed




Rosbag info
path:        src/stereo_slam/bag/stereo.bag
version:     2.0
duration:    3:55s (235s)
start:       Nov 11 2014 21:28:20.90 (1415737700.90)
end:         Nov 11 2014 21:32:16.65 (1415737936.65)
size:        668.3 MB
messages:    54083
compression: none [848/848 chunks]
types:       sensor_msgs/CameraInfo      [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/CompressedImage [8f7a12909da2c9d3332d540a0977563f]
             tf2_msgs/TFMessage          [94810edda583a504dfda3829e70d7eec]
topics:      /stereo_camera/left/camera_info_throttle              3741 msgs    : sensor_msgs/CameraInfo     
             /stereo_camera/left/image_raw_throttle/compressed     3753 msgs    : sensor_msgs/CompressedImage
             /stereo_camera/right/camera_info_throttle             3741 msgs    : sensor_msgs/CameraInfo     
             /stereo_camera/right/image_raw_throttle/compressed    3745 msgs    : sensor_msgs/CompressedImage
             /tf                                                  39103 msgs    : tf2_msgs/TFMessage          (2 connections)
miquelmassot commented 9 years ago

Your bagfile does not have camera named _camera_compwide, is _stereocamera instead, and the image topic is compressed. You've got a sample bagfile of our own available here. Please do the same "rosbag info" and check our topics. Then change the parameters and remappings in your launchfile accordingly.

The compilation error is given by stereo_slam, not viso2, and that's because the GraphPoses message has not been generated. The depencency is already set in our CMakeLists, so I suppose that if you compile again, after this same error, all dependencies will be met and there will not show any error.

plnegre commented 9 years ago

@solosito, I highly recommend you to follow the tutorials from ROS webpage before to start codding:

http://wiki.ros.org/ROS/Tutorials

Most of the problems you are pointing here are related to basic aspects of ROS.