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

How to run demo_in_ros.py? #5

Open
aatefi2 opened this issue Feb 12, 2024 · 7 comments
Open

How to run demo_in_ros.py? #5

aatefi2 opened this issue Feb 12, 2024 · 7 comments

Comments

@aatefi2
Copy link

aatefi2 commented Feb 12, 2024

Hi shangjie-li,

I am new to use Ros. I have installed Ros2 Humble on my Ubuntu 22.04. In order to run the code on Ros2, I think I should create a Ros2 package using demo_in_ros.py. Then, copy all other folders and python codes from Pointpillars to the Ros2 package (in demo_in_ros.py folder).
I have a Pointcloud2 message (ros2 bag play ousterbag/SegmentedandFiltered_0.db3 -l) and topic (ros2 topic echo /ouster_front/filtered_obstacle_points) running on two different Ros2 terminals. I think I need to replace /ouster_front/filtered_obstacle_points in the code (line 54 (sub_lidar)), replace rospy module with rclpy (for Ros2), replace line 22 with sys.path.remove('/opt/ros/humble/lib/python3.10/site-packages'),and modify other arg parameters.
Also, since I do not have 2D images and calibration files, comment all sub_image and clib_file lines in the code.
Is this procedure correct? Which other lines should I change to run the code on Ros2?

Thank you for your help.
Abbas

@shangjie-li
Copy link
Owner

My goal in implementing the demo_in_ros.py was to process the KITTI's official dataset in the ROS system and visually show the 3D object detection results of the PointPillar model. I'm not sure whether this script will work on ROS2. I also don't think this script can handle other rosbags (as you say, you don't have 2D image data).

If you want to run the script, you can download the KITTI dataset and generate the rosbag with some open source tools (for example, kitti2bag). When playing the rosbag, the two rostopics /kitti/camera_color_left/image_raw and /kitti/velo/pointcloud will be published. You can then run python demo_in_ros.py --ckpt=path_to_ckpt --display to see the result.

As for your own rosbag, I think you'll need to study the code and implement a new demo_in_ros.py.

@aatefi2
Copy link
Author

aatefi2 commented Feb 16, 2024

Hi shangjie-li,

Thank you so much for your useful comments and suggestions.

@Prabuddhi-05
Copy link

Hi shangjie-li,

I am new to use Ros. I have installed Ros2 Humble on my Ubuntu 22.04. In order to run the code on Ros2, I think I should create a Ros2 package using demo_in_ros.py. Then, copy all other folders and python codes from Pointpillars to the Ros2 package (in demo_in_ros.py folder). I have a Pointcloud2 message (ros2 bag play ousterbag/SegmentedandFiltered_0.db3 -l) and topic (ros2 topic echo /ouster_front/filtered_obstacle_points) running on two different Ros2 terminals. I think I need to replace /ouster_front/filtered_obstacle_points in the code (line 54 (sub_lidar)), replace rospy module with rclpy (for Ros2), replace line 22 with sys.path.remove('/opt/ros/humble/lib/python3.10/site-packages'),and modify other arg parameters. Also, since I do not have 2D images and calibration files, comment all sub_image and clib_file lines in the code. Is this procedure correct? Which other lines should I change to run the code on Ros2?

Thank you for your help. Abbas

Hi. Could you please let me know whether it worked in ROS2 Humble and Ubuntu 22.04 because I want to try the same. Thank you.

@aatefi2
Copy link
Author

aatefi2 commented Mar 5, 2024

Hi. Could you please let me know whether it worked in ROS2 Humble and Ubuntu 22.04 because I want to try the same. Thank you.

Hi,
I've encountered difficulties running it in ROS2, likely due to my limited expertise in utilizing ROS. Currently, I'm actively engaged in developing a ROS2 package. Specifically, I execute test.py and demo.py within a Python ROS2 subscriber node. Regrettably, I consistently encounter errors related to import Python modules from different sub-folders in pointpillars. It seems I need to install all modules in pointpillars folder as Python modules in ROS2. Despite my attempts to do so, the error persists. Please inform me once you've managed to resolve this issue.
Thanks,
Abbas

@Prabuddhi-05
Copy link

Hi. Could you please let me know whether it worked in ROS2 Humble and Ubuntu 22.04 because I want to try the same. Thank you.

Hi, I've encountered difficulties running it in ROS2, likely due to my limited expertise in utilizing ROS. Currently, I'm actively engaged in developing a ROS2 package. Specifically, I execute test.py and demo.py within a Python ROS2 subscriber node. Regrettably, I consistently encounter errors related to import Python modules from different sub-folders in pointpillars. It seems I need to install all modules in pointpillars folder as Python modules in ROS2. Despite my attempts to do so, the error persists. Please inform me once you've managed to resolve this issue. Thanks, Abbas

Hi Abbas. Thanks a lot for the update. I will let you know if I try this.

@aatefi2
Copy link
Author

aatefi2 commented May 31, 2024

Prabuddhi-05

Hi Prabuddhi-05,

I hope you are doing well. I was wondering if you've had a chance to run PointPillars on ROS2. Please let me know and thank you!

@maxxsuiii
Copy link

Hi everyone,

I was wondering if you guys already solve the PointPillars with Ros2 Humble or not. I also learn to run PointPillars in Ros2. Let me know and thank you!

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

4 participants