srv / stereo_slam

Other
132 stars 64 forks source link

Reconstruction.yaml missing from stereo slam package #3

Open tonystark12 opened 9 years ago

tonystark12 commented 9 years ago

I am trying to use a stereo slam package,and by following the instructions, I completed the installation. I am trying to run this slam with drcsim Atlas bot, spawned in a gazebo vrc task environment.

Now, by editing the demo.launch file of the package, I can link the stereo_slam package to subscribe to topics which provide with the stereo pair of images. The edited launch file

    <launch>

<arg name="bagfile" default="/tmp/ROS.bag"/>

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

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

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

<!-- Run the visual odometry: You can choose between viso2 and fovis -->
<node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer">
    <remap from="stereo" to="$(arg camera)"/>
    <remap from="image" to="image_color"/>
    <param name="base_link_frame_id" value="/pelvis"/>
</node>
<!--node pkg="fovis_ros" type="stereo_odometer" name="fovis">
    <remap from="stereo" to="$(arg camera)"/>
    <remap from="image" to="image_color"/>
    <param name="base_link_frame_id" value="/pelvis"/>
</node-->

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

    <!-- Working directory -->
    <param name="work_dir" value="/home/tonystark/freelancing/Atlas_slam/slam/" />

    <!-- Topic parameters -->
    <param name="odom_topic" value="stereo_odometer/odometry"/>
    <param name="left_topic" value="$(arg camera)/left/image_color"/>
    <param name="right_topic" value="$(arg camera)/right/image_color"/>
    <param name="left_info_topic" value="$(arg camera)/left/camera_info"/>
    <param name="right_info_topic" value="$(arg camera)/right/camera_info"/>

    <!-- Min displacement between graph vertices (in meters) -->
    <param name="min_displacement" value="0.25"/>

    <!-- Descriptor type: SIFT or SURF -->
    <param name="desc_type" value="SIFT"/>

    <!-- Can be "CROSSCHECK" or "RATIO" -->
    <param name="desc_matching_type" value="CROSSCHECK"/>

    <!-- Descriptor threshold for crosscheck matching (typically between 0.7-0.9) or ratio for ratio matching (typically between 0.6-0.8).  -->
    <param name="desc_thresh_ratio" value="0.88" />

    <!-- Minimum number of neighbors that will be skiped for the loop closure (tipically between 5-20, but depends on the frame rate) -->
    <param name="min_neighbor" value="10" />

    <!-- Get the n first candidates of the hash matching (tipically between 1-5) -->
    <param name="n_candidates" value="5" />

    <!-- Minimun number of descriptor matches to consider a matching as possible loop closure (>8) -->
    <param name="min_matches" value="30" />

    <!-- Minimum number of inliers to consider a matching as possible loop closure (>8) -->
    <param name="min_inliers" value="15" />

    <!-- Set to 0 for LinearSlam Solver with gauss-newton. Set to 1 for LinearSlam Solver with Levenberg -->
    <param name="g2o_algorithm" value="0" />

    <!-- Maximum number of iteration for the g2o algorithm -->
    <param name="g2o_opt_max_iter" value="10" />
</node>

<!-- Pointcloud collector -->
<node pkg="stereo_slam" type="collector" name="collector" output="screen">

    <param name="work_dir" value="/home/tonystark/freelancing/Atlas_slam/slam/" />

    <param name="graph_topic" value="slam/graph"/>
    <param name="cloud_topic" value="$(arg camera)/scaled/points2"/>

    <rosparam file="$(find stereo_slam)/etc/reconstruction.yaml" />

</node>

When executing

    roslaunch stereo_slam demo.launch

I get the following error

    error loading <rosparam> tag: 
file does not exist [/home/tonystark/lib_haloc/src/stereo_slam/etc/reconstruction.yaml]
    XML is <rosparam file="$(find stereo_slam)/etc/reconstruction.yaml"/>
    The traceback for the exception was written to the log file

Upon searching, neither directory /etc nor the file reconstruction.yaml exited. Has anybody made use of this package? If yes, can you please tell me how to solve this? Is it a file and folder I should create by myself? Thanks in advance

solbach commented 9 years ago

Hey, the file you mention has been deleted after commit 89bc321b05247ae607c2b5d43c9f6bf347de2555. Here you can find it: https://github.com/srv/stereo_slam/blob/89bc321b05247ae607c2b5d43c9f6bf347de2555/etc/reconstruction.yaml

Content

x_filter_min: -2.0
x_filter_max: 2.0
y_filter_min: -2.0
y_filter_max: 2.0
z_filter_min: 0.2
z_filter_max: 2.0

voxel_size_x: 0.005
voxel_size_y: 0.005
voxel_size_z: 0.4

radius_search: 0.2
min_neighors_in_radius: 40

My Best

tonystark12 commented 9 years ago

Thank you. Have you got this package up and running? I need a bit of help. Do you mind giving me a hand?

LN

On 12 August 2015 at 02:19, Markus Solbach notifications@github.com wrote:

Hey, same here, I try to get this code running. the file you mention has been deleted after commit _89bc321 https://github.com/srv/stereo_slam/commit/89bc321b05247ae607c2b5d43c9f6bf347de2555_. Here you can find it: https://github.com/srv/stereo_slam/blob/89bc321b05247ae607c2b5d43c9f6bf347de2555/etc/reconstruction.yaml

My Best

— Reply to this email directly or view it on GitHub https://github.com/srv/stereo_slam/issues/3#issuecomment-130066827.

solbach commented 9 years ago

No big deal. :) As soon as I have it running, I'll let you know.

tonystark12 commented 9 years ago

Thank you once again. I was not able to run it at all. I got few more errors and packages missing. For example, this one :

ERROR: cannot launch node of type [stereo_slam/collector]: can't locate node [collector] in package [stereo_slam]

Do you have this node?

On 12 August 2015 at 02:27, Markus Solbach notifications@github.com wrote:

No big deal. :) As soon as I have it running, I'll let you know.

— Reply to this email directly or view it on GitHub https://github.com/srv/stereo_slam/issues/3#issuecomment-130071786.

tonystark12 commented 9 years ago

I am trying to find from the commits, but please let me know if you had this node while running it. :)

LN

On 12 August 2015 at 02:33, Jagadeesh Sparrow lakshmifull@gmail.com wrote:

Thank you once again. I was not able to run it at all. I got few more errors and packages missing. For example, this one :

ERROR: cannot launch node of type [stereo_slam/collector]: can't locate node [collector] in package [stereo_slam]

Do you have this node?

On 12 August 2015 at 02:27, Markus Solbach notifications@github.com wrote:

No big deal. :) As soon as I have it running, I'll let you know.

— Reply to this email directly or view it on GitHub https://github.com/srv/stereo_slam/issues/3#issuecomment-130071786.

solbach commented 9 years ago

Yes, you are right. This node is missing currently and was part of stereo_slam one year ago (https://github.com/srv/stereo_slam/tree/3dc6cbf6263e56121030af05504a4fd92639eff3/src).

tonystark12 commented 9 years ago

Any idea why this is happening? Is it supposed to be a update?

On 12 August 2015 at 03:04, Markus Solbach notifications@github.com wrote:

Yes, you are right. This node is missing currently and was part of stereo_slam one year ago ( 3dc6cbf https://github.com/srv/stereo_slam/commit/3dc6cbf6263e56121030af05504a4fd92639eff3 ).

— Reply to this email directly or view it on GitHub https://github.com/srv/stereo_slam/issues/3#issuecomment-130084690.

tonystark12 commented 9 years ago

I am using Ros Indigo. I think the commits you showed are from Hydro.

On 12 August 2015 at 03:24, Jagadeesh Sparrow lakshmifull@gmail.com wrote:

Any idea why this is happening? Is it supposed to be a update?

On 12 August 2015 at 03:04, Markus Solbach notifications@github.com wrote:

Yes, you are right. This node is missing currently and was part of stereo_slam one year ago ( 3dc6cbf https://github.com/srv/stereo_slam/commit/3dc6cbf6263e56121030af05504a4fd92639eff3 ).

— Reply to this email directly or view it on GitHub https://github.com/srv/stereo_slam/issues/3#issuecomment-130084690.

tonystark12 commented 9 years ago

Hey mate. Any help? Just wanted to know if you got somewhere. Check this link for some more corrections.

https://github.com/srv/viso2/issues/28

On 12 August 2015 at 02:19, Markus Solbach notifications@github.com wrote:

Hey, same here, I try to get this code running. the file you mention has been deleted after commit _89bc321 https://github.com/srv/stereo_slam/commit/89bc321b05247ae607c2b5d43c9f6bf347de2555_. Here you can find it: https://github.com/srv/stereo_slam/blob/89bc321b05247ae607c2b5d43c9f6bf347de2555/etc/reconstruction.yaml

My Best

— Reply to this email directly or view it on GitHub https://github.com/srv/stereo_slam/issues/3#issuecomment-130066827.

solbach commented 9 years ago

so... I have it running without any errors. I am also able to visualize the odometry in rviz. Since I don't have loop-closing data and my images are bigger than 700px ( in width, less is recommended(!) ) I am not able to test the whole algorithm. But I think with the following steps, you can push your progress.

You will discover that the devel branch doesn't have any launch file and some files are missing (msg, launch) and the CMakeLists.txt is not complete. Let's work on that:

Missing file _stereo_cropdecimate.launch

Missing messages

## Declare ROS messages and services
add_message_files(FILES SlamInfo.msg SlamVertex.msg SlamEdge.msg Correction.msg GraphData.msg)
generate_messages(DEPENDENCIES std_msgs)

Missing Launch File

Copy the following lines and place it in _catkin_ws/src/stereoslam/stereo.launch

<launch>

    <!--Setup Bagfile-->
    <arg name="bagfile" default="/home/user/catkin_ws/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/user/catkin_ws/src/stereo_slam/data" />

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

    </node>

</launch>

Please let me know if that helped. Also if you are able to reconstruct or get the graph_viewer running, tell me.

yanming-zou commented 9 years ago

Hi Solbach,

Your input is very helpful. The program can run on my side, but there is still one issue.

I can't view the topic /graph_camera_odometry in rViz, the reason is that the frame_id is empty.

I am not sure what the reason is. Does it work well on your side?

BTW, it is really appreciated if you can share a input bag file with me. Thanks a lot

Yanming

solbach commented 9 years ago

Hey, you can use this bag file to test it. But since it is form rtabmap_ros and uses different topics, you need to change the name of the topics stereo_slam is listening to.

Cheers