ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Error with launch file and rosrun using a ROS package

asked 2022-03-25 06:22:18 -0500

Petros ADLATUS gravatar image

updated 2022-03-31 08:34:58 -0500

miura gravatar image

Hey guys,

I am in the process of using a ROS package (https://github.com/beltransen/lidar_bev) that converts PointCloud data into Bird Eye View images. I have successfully installed the package with catkin. I use my own launch file (supplemented with that of the ROS package) to import bag files and get the desired images. The input message is sensor_msgs/PointCloud2, which is also included in my bag files.

My first question would be, can the bag files only contain this one message in order to run it compatible with the package?

Attached is my launch file:

<launch>
< !--1. start bag files playback-- >

< node pkg ="rosbag" type="play" name="bag_files_playback" output="screen" args="/home/pkatsoulakos/catkin_ws/src/launch/rosbags/Besprechungsraum/_2022-03-23-08-37-50_0.bag  /home/pkatsoulakos/catkin_ws/src/launch/rosbags/Besprechungsraum/_2022-03-23-08-39-07_2.bag"/ >

< !-- 2. topics and frames -- >

< arg name="cloud_topic" default="/velodyne_points"/>

    < arg name="lidar_tf_frame" default="/velodyne"/>

    < arg name="camera_tf_frame" default="/stereo_camera"/> 

< !-- MAP CONFIGURATION -- >

    <arg name="camera_fov" default="110.0"/>
    <arg name="intensity_threshold" default="0.05" />
    <arg name="cell_size" default="0.05" />
    <arg name="cell_size_height_map" default="0.25" />
    <arg name="max_height" default="3.0" />
    <arg name="num_slices" default="1" />
    <arg name="grid_dim" default="70" />
    <arg name="grid_dim_height_map" default="300" />
    <arg name="height_threshold" default="0.10" />
    <arg name="crop_180" default="true" />
    <arg name="remove_floor" default="false" />

< !-- VLP16 change for my purposes?-- >

    <arg name="planes" default="16" />
    <arg name="h_res" default="0.2" />
    <arg name="v_res" default="1.33" />
    <arg name="low_opening" default="-10" />
    <arg name="max_expected_intensity" default="5" />

< !--2. start lidar_bev-- >

< node pkg="lidar_bev" type="lidar_bev" name="lidar_bev_run" output="screen" >

        <param name="cloud_topic" value="$(arg cloud_topic)"/>
        <param name="lidar_tf_frame" value="$(arg lidar_tf_frame)"/>
        <param name="camera_tf_frame" value="$(arg camera_tf_frame)"/>
        <param name="camera_fov" value="$(arg camera_fov)"/>
        <param name="planes" value="$(arg planes)"/>
        <param name="h_res" value="$(arg h_res)"/>
        <param name="v_res" value="$(arg v_res)"/>
        <param name="low_opening" value="$(arg low_opening)"/>
        <param name="cell_size" value="$(arg cell_size)"/>
        <param name="grid_dim" value="$(arg grid_dim)"/>
        <param name="max_height" value="$(arg max_height)"/>
        <param name="num_slices" value="$(arg num_slices)"/>
        <param name="height_threshold" value="$(arg height_threshold)"/>
        <param name="cell_size_height_map" value="$(arg cell_size_height_map)"/>
        <param name="grid_dim_height_map" value="$(arg grid_dim_height_map)"/>
        <param name="max_expected_intensity" value="$(arg max_expected_intensity)"/>
        <param name="crop_180" value="$(arg crop_180)"/>
        <param name="remove_floor" value="$(arg remove_floor)"/>

    </node> 

</launch>

I would be very grateful if someone could help me to make this conversion.

image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-05-03 07:50:01 -0500

Petros ADLATUS gravatar image

updated 2022-05-03 07:50:39 -0500

alternative solution: I finally gave up with this node, because the support isn't good enough (no Issues, no other users of it) and solve it with this node: https://github.com/mjshiggins/ros-examples. I have modified (image size, colored pointcloud, resolution) the node a little bit, cause the default settings aren't good enough for my purposes. Hope this helps everyone who wants to create LiDAR images for Deep Learning usage.

edit flag offensive delete link more
2

answered 2022-03-25 10:36:14 -0500

miura gravatar image

updated 2022-03-28 07:55:27 -0500

This may be accomplished with the --topicsoption. ref: http://wiki.ros.org/rosbag/Commandlin...

Check the topic name in sensor_msgs/PointCloud2. If it is named point_cloud2, only the sensor_msgs/PointCloud2 topic will be played in the following.

< node pkg ="rosbag" type="play" name="bag_files_playback" output="screen" args="/home/pkatsoulakos/catkin_ws/src/launch/rosbags/Besprechungsraum/_2022-03-23-08-37-50_0.bag  /home/pkatsoulakos/catkin_ws/src/launch/rosbags/Besprechungsraum/_2022-03-23-08-39-07_2.bag --topics point_cloud2"/ >

UPDATE

I think the following steps will move us forward

Try running rostopic echo /lidar_run/yrl_cloud while playing rosbag. Check the frame_id in the output result.

The name you checked is reflected in the following in the launch file. ( Replace the string checked above with /velodyne. )

 < arg name="lidar_tf_frame" default="/velodyne"/>
edit flag offensive delete link more

Comments

Hey,

I tried your advice with the topic name. It's --topics /lidar_run/yrl_cloud, but it gives me the same Warning message:

[WARN] [1648447358.591702320: "velodyne" passed to lookupTransform argument target_frame does not exist.

And honestly I don't know how I can add the target_frame or what must be the necessary step. My idea is to finish writing the launch file (add the image save part), so that the Output message: bird_view (sensor_msgs/Image): BEV image (see github) from this package can be saved as Image..

Petros ADLATUS gravatar image Petros ADLATUS  ( 2022-03-28 01:11:14 -0500 )edit

Thanks for trying. I updated my answer.

miura gravatar image miura  ( 2022-03-28 07:56:17 -0500 )edit

hey,

I find out that the default=" " of the lidar_tf_frame is the problem. I searched the frame, which comes from my LiDAR, called yrl_cloud_id and passed it there (launch file and C++ Code of the package), but it still gives me the same warning.The package tf is used to transform the coordinates of Sensor for my application on the computer, can it be that I have to do this again for using the ROS package?

You can look at line 331 - 350 for better understanding

Petros ADLATUS gravatar image Petros ADLATUS  ( 2022-03-28 08:27:21 -0500 )edit

What if we drop my suggestion --topics /lidar_run/yrl_cloud and make it possible to refer to all of rosbag's data? It is possible that /tf was there originally but is not being referenced because of the use of --topics.

If this does not solve the problem, could you check the TF tree with rosrun tf view_framesand share it with us? ( ref https://wiki.ros.org/tf/Debugging%20t... )

miura gravatar image miura  ( 2022-03-29 06:43:49 -0500 )edit
1

I would like to share all the information with you, but my status is too low for uploading photos etc. How do we establish a workaround for this? Email? Of Course i would post the answer here, in fact that maybe other people want to use this ROS package

Petros ADLATUS gravatar image Petros ADLATUS  ( 2022-03-29 07:08:51 -0500 )edit
1

Can you please make it publicly available on Imgur, google photo, etc. and post a link to it? I will download it and post the image here.

miura gravatar image miura  ( 2022-03-30 08:46:41 -0500 )edit

https://photos.app.goo.gl/xSs5JBNWG13... hope it works. I fixed the param name cloud topic in my launch file, but dont understand why the source frame, camera_frameis missing. as i understand it, the package is based on the encoding of birdnet and birdnet+ with pure point cloud data without camera recordings. I still add my launch file and the code I changed (https://drive.google.com/drive/folder...).

thanks a lot for your help

Petros ADLATUS gravatar image Petros ADLATUS  ( 2022-03-31 02:20:31 -0500 )edit
1

Thanks for the image, I pasted the TF tree at the end of the question. By the way, it is recommended to paste text rather than screenshots for code excerpts and logs.

miura gravatar image miura  ( 2022-03-31 08:36:51 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-03-25 06:22:18 -0500

Seen: 165 times

Last updated: May 03 '22