-
Notifications
You must be signed in to change notification settings - Fork 289
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
Comments
I have the same question. What's more, the output laserscan in rviz shows that status ok but 0 point. |
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 |
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:
|
Do you use msg_MID360_launch.py or rivz_MID360_launch.py when you publish livox mid360 data? |
range_min: 0.44999998807907104 |
oh!! I solve it. it's communication problems in rviz. ros2/rviz#578 |
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) |
I have the same issue but im quite new to all this things. Can you please show what exactly sample_pointcloud_to_laserscan_launch.py and pointcloud_to_leaserscan_node.cpp should contain? |
@makanov001 or may be you can provide the step by step tutorial please? |
Hello, @maxxbolotov ,you need to change the relevant parameters of two files, the two files are: /src/pointcloud_to_leaserscan_node.cpp(named node.cpp) and /launch/sample_pointcloud_to_laserscan_launch.py(named launch.py). 1-In launch.py, Delet all remapping in launch.py, so that your topic name only depends on node.cpp.
2-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. Also, you need to change the frequency of publich on line 78 to fix the display of rviz. 3- Data issues |
I did everything as you said. Also launch rviz_MID360_launch.py but still got 0 points from 0 messages beside laserscan topic is ok. |
Solved after changing launch.py using lidar configurations. |
I am facing the same issue @maxxbolotov , can you please elaborate on how to fix it? Thank you |
Sure, here it is:
Attention. Be sure that you are providing a correct configuration of your lidar in launch.py file. The default one is not fits for any lidar. I mean range_max, range_min and so on. |
Thank you @maxxbolotov it works now! |
May I ask whether this algorithm is applicable to the data of livox-mid360
The text was updated successfully, but these errors were encountered: