Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D map for 3D lidar #3

Open
vanquang741987 opened this issue Sep 15, 2020 · 4 comments
Open

2D map for 3D lidar #3

vanquang741987 opened this issue Sep 15, 2020 · 4 comments

Comments

@vanquang741987
Copy link

Hello~
May I make 2D map from 3d yujin lidar?
Do you have manual to make 2d or 3d map in ROS for AMR?
Thank you so much

@engineeve
Copy link

engineeve commented Sep 16, 2020

I am also looking to do this. I have started by attempting to use the pointcloud_to_laserscan ROS package to convert the 3D point cloud to 2D LaserScan. This requires the PointCloud data to be converted into the PointCloud2 datatype, which I have done in the yrl_pub.cpp node. I use the following parameters for the pointcloud_to_laserscan package:
<launch> <node pkg="yujin_yrl_package" type="yrl_pub" name="yrl_pub"> </node> <node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan"> <remap from="cloud_in" to="/yrl_pub/yrl_cloud"/> <remap from="scan" to="/scan" /> <rosparam> target_frame: yrl_cloud_id transform_tolerance: 0.01 min_height: .3 max_height: .4 angle_increment: 0.0087 scan_time: .333 range_min: 0.45 range_max: 10.0 use_inf: false #concurrency_level affects number of pc queued for processing and the number of threadsused # 0: Detect number of cores # 1: Single threaded # 2: inf : Parallelism level concurrency_level: 1 </rosparam> </node> </launch>

I also changed line 232 of the yrl_pub.cpp file from:
br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "map", "yrl_cloud_id"));
to:
br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "base_laser_link", "yrl_cloud_id"));

This results in the scan topic having mostly inf or range_max+1 values, so the package is rejecting most of the pointcloud values. if I increase the max_height, there are less inf values but still quite a lot. It seems similar to the issue this user has https://answers.ros.org/question/205552/pointcloud_to_laserscan-rotation-of-scan-line/ - Can you please advise on how to convert the pointcloud to 2D LaserScans ?

@jykim3
Copy link
Collaborator

jykim3 commented Sep 24, 2020

@vanquang741987 @engineeve
Hello. My name is Ju Young Kim, and I am the author of this YRL Library(Linux, Windows, ROS), working as a project manager for LiDAR Team in Yujin Robot. (Sorry for my late reply.)

We do not have a manual about how to make a 2d or 3d map using ROS Driver.

I am just wondering, if pointcloud2 is supported, does conversion from 3D PointCloud to 2D LaserScan become easier?
(We have a plan for pointcloud 2 updates, and before that, this link might be helpful)

@engineeve
Copy link

Hi @jykim3,

Thank you for your reply. I am currently converting the PointCloud to PointCloud2 and successfully using pointcloud_to_laser scan to convert the 3D point cloud to a 2D laserscan. However, as the full scan takes over a second and the time between scans is too long to localize in 2D and when trying to map I get matching errors with the scans and odom. The plan originally was to use ROS 2D amcl navigation with 3D obstacle avoidance. We are open to changing our navigation system to a 3D one or one that better fits the capabilities of the Yujin Lidar - can you advise an opensource nav stack that works well with the 3D lidar ?

@jykim3
Copy link
Collaborator

jykim3 commented May 11, 2021

@engineeve
Hello,

sorry for the late reply.

why don't you try this package : https://github.com/RobustFieldAutonomyLab/LeGO-LOAM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants