-
Notifications
You must be signed in to change notification settings - Fork 2
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
Is there a way to run this and test? #2
Comments
这个代码有人成功实现了吗,为什么依赖一直报错 |
Sorry, this is a project I did back in college. I believe what you have to do is to follow the installation instructions in the README of the PointPillars repo I made this wrapper over. You have to make sure it compiles correctly and then it should be able to run the object detector. Then you need to compile it as a ROS 2 package. My code is messy and newbie-ish so take it with a grain of salt. Idk why I got so many stars lol, I was just prototyping some object detection nodes for an undergrad self-driving project. |
谢谢您在百忙之中的回复,我已经按照您所给链接训练好了自己的pointpillars模型,得到了自己的权重,但是我想要写一个ros2节点包来调用激光雷达进行实时检测,一直没有进展,看了您的这个ROS 2 node wrapper around the PyTorch implementation of PointPillars的源码,想要复现失败了,请问您还有这种封装pointpillars模型调用激光雷达实时检测的ros2代码吗,可以跟我交流一下吗,万分感谢!! |
Okay, so here's what I remember from back then: The source code for the object detection node is under src/lidar_object_detection/lidar_object_detection. I put all the PointPillars code in there as a submodule for convenience. What you need to do is (after installing necessary python packages) is to compile the src/lidar_object_detection/lidar_object_detection/ops cuda code for faster voxelization necessary for running the detector. After that, you compile the ROS 2 packages using colcon (I assume you know how to do this, if not just look at ROS 2 wiki). Under launch/main.launch.py specifies nodes that need to be launched to produce object detection inference on RViz2 from a sample of the KITTI lidar dataset. I put 10 samples under src/lidar_object_detection/lidar_object_detection/data as dummy data. The node lidar_publisher_node defined in src/lidar_object_detection/lidar_object_detection/lidar_publisher_node.py will publish that dummy data. The node lidar_object_detector_node defined in src/lidar_object_detection/lidar_object_detection/lidar_object_detector_node.py will take those published lidar msgs, perform inference using the PointPillars submodule, and spit out the results in a custom msg defined in src/object_detection_msgs. As for loading the weights, I put pretrained weights under src/lidar_object_detection/lidar_object_detection/weights/epoch_160.pth, and the code should automatically reference that. For visualization, the published bounding boxes by the object detection node will be parsed by object3d_visualizer_node defined under src/object_visualization/object_visualization/object3d_visualizer_node.py. It will output markers that you can see in RViz2, showing the 3d bounding box. I hope this helps. Remember that I created this code over a weekend in college, well over a year ago. I don't remember all the details, and the code is not the cleanest. Ragib |
感谢您在百忙之中抽出时间来回复我的问题,我得到了很多启发,但是我本科学习的是土木工程,对于计算机不是很深入了解,你所说的我看得懂,但是在您的文件结构中的操作我一直出错。
我想把您的数据包压缩发给您,请问您是否能够有时间帮我看一下,我只需要一个简单的能够调用权重文件的ros2节点进行调用激光雷达实时可视化检测,不需要任何优化,请问您是否有时间能够帮我简单摘出几个包或者给我一个简单的节点能够实现这个任务,万分感谢。
打扰到您的时间我感到很抱歉,如果您能帮助我我万分感谢和荣幸,如果您没有时间那也没有关系,十分感谢您这段时间提供的帮助。
yue
…------------------ 原始邮件 ------------------
发件人: "ragibarnab/ros2-lidar-object-detection" ***@***.***>;
发送时间: 2025年1月8日(星期三) 下午3:28
***@***.***>;
***@***.******@***.***>;
主题: Re: [ragibarnab/ros2-lidar-object-detection] Is there a way to run this and test? (Issue #2)
Okay, so here's what I remember from back then:
The source code for the object detection node is under src/lidar_object_detection/lidar_object_detection. I put all the PointPillars code in there as a submodule for convenience. What you need to do is (after installing necessary python packages) is to compile the src/lidar_object_detection/lidar_object_detection/ops cuda code for faster voxelization necessary for running the detector. After that, you compile the ROS 2 packages using colcon (I assume you know how to do this, if not just look at ROS 2 wiki).
Under launch/main.launch.py specifies nodes that need to be launched to produce object detection inference on RViz2 from a sample of the KITTI lidar dataset.
I put 10 samples under src/lidar_object_detection/lidar_object_detection/data as dummy data. The node lidar_publisher_node defined in src/lidar_object_detection/lidar_object_detection/lidar_publisher_node.py will publish that dummy data.
The node lidar_object_detector_node defined in src/lidar_object_detection/lidar_object_detection/lidar_object_detector_node.py will take those published lidar msgs, perform inference using the PointPillars submodule, and spit out the results in a custom msg defined in src/object_detection_msgs. As for loading the weights, I put pretrained weights under src/lidar_object_detection/lidar_object_detection/weights/epoch_160.pth, and the code should automatically reference that.
For visualization, the published bounding boxes by the object detection node will be parsed by object3d_visualizer_node defined under src/object_visualization/object_visualization/object3d_visualizer_node.py. It will output markers that you can see in RViz2, showing the 3d bounding box.
I hope this helps. Remember that I created this code over a weekend in college, well over a year ago. I don't remember all the details, and the code is not the cleanest.
Ragib
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
从QQ邮箱发来的超大附件
ros2-lidar-object-detection-master.zip (74.53M, 2025年02月07日 16:05 到期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=6e3161339dba62cbc011e49a4036071f4d450450500f0d0518065904531b05090d524c525554041d500456045f0e0c0407085303661035425a42531e0a5f5151471c0e510c53564418550447035541595a5f4c5e07454155471f1b5a163608&code=51a3f650
|
Just paste the error you have and I can look at it. However, I won't be able to reproduce it on my end because I do not have a linux machine available to test the code. But I could help you debug it. |
感谢您的回复,您能够回复我我感到非常荣幸与感激。在运行代码前我有几个关于这个代码的小问题想请教一下:
1.您的这个包里的文件都是必须的吗,有没有是可以去除的,因为文件越多对我的调试困难度越大,因为我是跨专业学习
2.您的包中的src文件下有四个文件,既有python文件也有c++文件,可以单独编译后单个启动而不使用launch启动吗
3.在object_detection_msgs中的msg下的三个文件(Object3d.msg等)是需要编译后才能用吗,为什么我在别的包调用显示找不到下面的包
4.ros2_numpy中的文件每个都有作用吗,都需要编译吗
…------------------ 原始邮件 ------------------
发件人: "ragibarnab/ros2-lidar-object-detection" ***@***.***>;
发送时间: 2025年1月9日(星期四) 上午9:09
***@***.***>;
***@***.******@***.***>;
主题: Re: [ragibarnab/ros2-lidar-object-detection] Is there a way to run this and test? (Issue #2)
Just paste the error you have and I can look at it. However, I won't be able to reproduce it on my end because I do not have a linux machine available to test the code. But I could help you debug it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
These are very basic questions, all of which can be answered by following the wiki. You do not need tons of computer knowledge to go through and understand this material. In this "field" you have to be very self-reliant, because a lot of this material is not taught in schools, and even regular computer science students will not understand this material without going through the wiki. But I promise, it's not that hard to pick up, ROS was designed to be simple. As always, google is your best friend. |
很感谢您的回复,我受到了很大启发。我还想问一下这个包最后接收激光雷达数据后处理完成后生成识别框的界面是rviz可视化的动态识别还是生成open3d图像来显示识别框。谢谢您的回复,感谢您这段时间来的大力帮助!
…------------------ 原始邮件 ------------------
发件人: "ragibarnab/ros2-lidar-object-detection" ***@***.***>;
发送时间: 2025年1月10日(星期五) 下午2:18
***@***.***>;
***@***.******@***.***>;
主题: Re: [ragibarnab/ros2-lidar-object-detection] Is there a way to run this and test? (Issue #2)
I don't understand what you are asking here, maybe it got lost in translation?
I'm assuming you are asking how to launch individual nodes. After building and sourcing the packages, you would run ros2 run package_name node_name, so for example to run the object detection node: ros2 run lidar_object_detection lidar_object_detector_node.
Yes, the object_detection_msgs need to be compiled. You have to compile everything together with colcon so dependencies are properly found.
Again, every package needs to be compiled using colcon and sourced in order for the everything to work, including ros2_numpy. I would not worry about the role of each file, just compile and run, that's the main idea.
These are very basic questions, all of which can be answered by following the wiki. You do not need tons of computer knowledge to go through and understand this material. In this "field" you have to be very self-reliant, because a lot of this material is not taught in schools, and even regular computer science students will not understand this material without going through the wiki. But I promise, it's not that hard to pick up, ROS was designed to be simple. As always, google is your best friend.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
The object3d_visualizer_node will publish markers that can be seen in RViz. I don't know about Open3D. |
谢谢您,我需要的就是RViz可视化,但是我的object_detection_msgs部分一直编译不通过,我单独编译这一部分显示缺少“em”
" ModuleNotFoundError: No module named 'em'"这是问题的名字,我一直安装不好这个模块
我想知道lidar_object_detection,object_detection_msgs这两块可以结合一下吗
…------------------ 原始邮件 ------------------
发件人: "ragibarnab/ros2-lidar-object-detection" ***@***.***>;
发送时间: 2025年1月15日(星期三) 凌晨1:59
***@***.***>;
***@***.******@***.***>;
主题: Re: [ragibarnab/ros2-lidar-object-detection] Is there a way to run this and test? (Issue #2)
The object3d_visualizer_node will publish markers that can be seen in RViz. I don't know about Open3D.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
https://robotics.stackexchange.com/questions/79779/importerror-no-module-named-em-error Follow this link and try any solutions you can find. |
I am looking into real-time object detection with Lidar pointcloud and I came across this. So is this the right repo and is there a way to test it?
The text was updated successfully, but these errors were encountered: