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

Adaptive mid360? #94

Open
makanov001 opened this issue Oct 31, 2024 · 11 comments
Open

Adaptive mid360? #94

makanov001 opened this issue Oct 31, 2024 · 11 comments

Comments

@makanov001
Copy link

May I ask whether this algorithm is applicable to the data of livox-mid360

@Un1Lee
Copy link

Un1Lee commented Nov 12, 2024

I have the same question. What's more, the output laserscan in rviz shows that status ok but 0 point.

@Un1Lee
Copy link

Un1Lee commented Nov 12, 2024

May I ask whether this algorithm is applicable to the data of livox-mid360

it can not for livox form, you can use livox code for rviz, it's pointcloud2 form. Or you change this code for livox form. My question about mid360 is its param for laserscan.

@makanov001
Copy link
Author

May I ask whether this algorithm is applicable to the data of livox-mid360

it can not for livox form, you can use livox code for rviz, it's pointcloud2 form. Or you change this code for livox form. My question about mid360 is its param for laserscan.

I tried to use livox custom pointcloud format (livox_ros_driver2/CustomMsg) and pointcloude2 format (sensor_msgs/PointCloud2) without success, my attempt seems to be similar to your description, There is no point cloud output in rviz

@Un1Lee
Copy link

Un1Lee commented Nov 12, 2024

May I ask whether this algorithm is applicable to the data of livox-mid360

it can not for livox form, you can use livox code for rviz, it's pointcloud2 form. Or you change this code for livox form. My question about mid360 is its param for laserscan.

I tried to use livox custom pointcloud format (livox_ros_driver2/CustomMsg) and pointcloude2 format (sensor_msgs/PointCloud2) without success, my attempt seems to be similar to your description, There is no point cloud output in rviz

have you check your rqt_graph that it really convert the cloud_in to scan? I used to make mistake in topic name. Now I have correct rqt_graph and right frame id. I echo scan topic, I can get range which seems OK. But rviz show nothing.
IMG_20241112_200520

@makanov001
Copy link
Author

echo scan topic

It seems that you are closer to success, I may also use the wrong topic name, when I echo scan topic, there are a lot of invalid point data (inf), and each scan data is the same, in addition, I also have a problem is that when I change the configuration parameter in launch.py, For example, after range_min or range_max, echo scan topic still displays the original configuration parameters. The following is a piece of data displayed by my echo scan topic. If possible, please provide your configuration file. I want to see if I used the wrong topic name.

header:
stamp:
sec: 1730296024
nanosec: 516303117
frame_id: cloud
angle_min: -1.5707999467849731
angle_max: 1.5707999467849731
angle_increment: 0.008700000122189522
time_increment: 0.0
scan_time: 0.33329999446868896
range_min: 0.44999998807907104
range_max: 4.0
ranges:

  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • 0.9698204398155212
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • 0.7160065770149231
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • .inf
  • 0.9560691714286804

@makanov001
Copy link
Author

May I ask whether this algorithm is applicable to the data of livox-mid360

it can not for livox form, you can use livox code for rviz, it's pointcloud2 form. Or you change this code for livox form. My question about mid360 is its param for laserscan.

Do you use msg_MID360_launch.py or rivz_MID360_launch.py when you publish livox mid360 data?

@Un1Lee
Copy link

Un1Lee commented Nov 12, 2024

range_min: 0.44999998807907104
range_max: 4.0.
Change this paramter in launch file, mid360 not only 4.0. I change it as 20. the > max_range will show as inf.
I will check the param for more exactly param tomorrow. but I think my ranges has no error now, why rviz show 0 point. I use fastlio2, which sub livox and pub pointcloud2. My project need fastlio2. So I use msg_MID. But I think rviz_MID360 is totally OK, and I think my fastlio2 output is similar with rviz_MID360.

@Un1Lee
Copy link

Un1Lee commented Nov 12, 2024

oh!! I solve it. it's communication problems in rviz. ros2/rviz#578
78 line, create_publish, rclcpp::SensorDataQoS()->10. build then run, rviz would show 330 points.

@makanov001
Copy link
Author

Congratulations on solving this problem, can you help me with something? I read the link you shared, but I don't quite understand which code in which file needs to be changed. In addition, could you please provide your complete launch file? I think my topic name relationship may be incorrectly configured. Thank you.

@Un1Lee
Copy link

Un1Lee commented Nov 13, 2024

Congratulations on solving this problem, can you help me with something? I read the link you shared, but I don't quite understand which code in which file needs to be changed. In addition, could you please provide your complete launch file? I think my topic name relationship may be incorrectly configured. Thank you.

All you need is /src/pointcloud_to_leaserscan_node.cpp(named node.cpp) and /launch/sample_pointcloud_to_laserscan_launch.py(named launch.py). Delet all remapping in launch.py, so that your topic name only depends on node.cpp. In node.cpp, 78 line is publich, and 123 line is subscribe, change the publich name as your pointcloud2 topic, and change the subscribe name as you want. Then you can check this in rqt_graph.

rviz status show ok but no point is beause communication problems. To address it, you only need to change code in 78 line, the public in node.cpp. Change the pub frequen: rclcpp::SensorDataQoS()->10. Then the line 78 line should be like: pub_ = this->create_publisher<sensor_msg::msg::LaserScan>('/scanner/scan/', 10)

@makanov001
Copy link
Author

According to the solution you gave, I successfully solved this problem, thank you for sharing!
Uploading QQ.png…

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

2 participants