SafeRoboticsLab / Safe_Occlusion_Aware_Planning

Repository for "Safe Occlusion-aware Autonomous Driving via Game-Theoretic Active Perception" - RSS 2021
Other
33 stars 7 forks source link

A few questions about the code in the repo vs the paper #1

Open cpacker opened 2 years ago

cpacker commented 2 years ago

Hi, I'm interested in reproducing the experiments from the paper, but am running into a few issues:

Let me know if you'd like me to test anything on my end in case there's user error.

zzx9636 commented 2 years ago

I just make a few updates in the repo.

JeffTheHacker commented 2 years ago

Hi, I cloned the newest changes and attempted to run the experiments with Carla 0.9.12, and ran into a few issues. Below I take test_blind_summit.py as an example and describe the errors I have encountered:

  1. An initial run throws the following error: pygame.error: Couldn't open cache/no_rendering_mode/Carla/Maps/Town03_ec2989811f7481fc0c59c5132ffadaa8ba04102c.tga Which I suspect is because the directory structure is wrong. I fixed this by adding in a Carla/Maps folder and placing the .tga files in the corresponding folders.
  2. Then the following error was thrown: Traceback (most recent call last): File "test_blind_summit.py", line 72, in <module> hud.tick(client, game) File "Safe_Occlusion_Aware_Planning-main/client/gui.py", line 90, in tick c = world.ego.get_control() AttributeError: 'Actor' object has no attribute 'get_control' Which I suspect is because of a carla api version mismatch error. As a result I commented out this line of code, but I am confused because I thought the code works with carla 0.9.12.
  3. And then this error is thrown: Traceback (most recent call last): File "test_blind_summit.py", line 74, in <module> client.render() File "Safe_Occlusion_Aware_Planning-main/client/client.py", line 310, in render depth.update_visualizer(folder, id) TypeError: update_visualizer() takes 1 positional argument but 3 were given Which I fixed by removing the arguments to update_visualizer, but I am not sure if this is the correct approach.
  4. Then finally the script is able to execute, because there is still carla errors coming out: ERROR: Actor 956 (sensor.other.lane_invasion) : not attached to a vehicle Which I am unsure how to resolve.
  5. When observing the spectator, it seems like the script doesn't seem to create a vehicle, the camera just outputs an empty street and there is no movement, despite the plans are outputted on the terminal. It would be great if the author can provide any insight into the above errors!
zzx9636 commented 2 years ago

I had the same issue with 0.9.12. You will need to use 0.9.11, or change most of functions in client.py to match 0.9.12

On Nov 12, 2021, at 11:35 PM, Jeff He @.***> wrote:

 Hi, I cloned the newest changes and attempted to run the experiments with Carla 0.9.12, and ran into a few issues. Below I take test_blind_summit.py as an example and describe the errors I have encountered:

An initial run throws the following error: pygame.error: Couldn't open cache/no_rendering_mode/Carla/Maps/Town03_ec2989811f7481fc0c59c5132ffadaa8ba04102c.tga Which I suspect is because the directory structure is wrong. I fixed this by adding in a Carla/Maps folder and placing the .tga files in the corresponding folders. Then the following error was thrown: Traceback (most recent call last): File "test_blind_summit.py", line 72, in hud.tick(client, game) File "Safe_Occlusion_Aware_Planning-main/client/gui.py", line 90, in tick c = world.ego.get_control() AttributeError: 'Actor' object has no attribute 'get_control' Which I suspect is because of a carla api version mismatch error. As a result I commented out this line of code, but I am confused because I thought the code works with carla 0.9.12. And then this error is thrown: Traceback (most recent call last): File "test_blind_summit.py", line 74, in client.render() File "Safe_Occlusion_Aware_Planning-main/client/client.py", line 310, in render depth.update_visualizer(folder, id) TypeError: update_visualizer() takes 1 positional argument but 3 were given Which I fixed by removing the arguments to update_visualizer, but I am not sure if this is the correct approach. Then finally the script is able to execute, because there is still carla errors coming out: ERROR: Actor 956 (sensor.other.lane_invasion) : not attached to a vehicle Which I am unsure how to resolve. When observing the spectator, it seems like the script doesn't seem to create a vehicle, the camera just outputs an empty street and there is no movement, despite the plans are outputted on the terminal. It would be great if the author can provide any insight into the above errors! — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

JeffTheHacker commented 2 years ago

Hi, I switched to 0.9.11 and reran the experiments. However this time, some errors about Octomap occurred when I tried to run either of test_intersection and test_blind_summit.

Traceback (most recent call last): File "test_blind_summit.py", line 59, in game = HybridGame(client, filename, ego_path, v_max =v_max, a_max=a_max, dp = 0.5, dl = 0.5, dt_sim = dt_sim, dt_plan = dt_plan, dv = 0.5) File "Safe_Occlusion_Aware_Planning-main/planning/hybrid_game.py", line 23, in init range = sensor_range, ds = 0.5, v_max=v_max, a_max=a_max) File "Safe_Occlusion_Aware_Planning-main/risk_analysis/info_space.py", line 27, in init self.shadow_manager = ShadowUtils(self.client, self.road_network, octomap_file, self.route, range, ds, v_max, a_max) File "Safe_Occlusion_Aware_Planning-main/risk_analysis/shadow_utils.py", line 31, in init self.vis_checker_octomap = OctomapVisibility(octomap_file, self.road_network, range) File "Safe_Occlusion_Aware_Planning-main/risk_analysis/visibility_checker.py", line 8, in init self.occupancy_map = OccupancyMap(filename = octomap_file) File "Safe_Occlusion_Aware_Planning-main/mapping/occupancy_map.py", line 54, in init self.octree = octomap.OcTree(self.resolution) AttributeError: module 'octomap' has no attribute 'OcTree' WARNING: sensor object went out of the scope but the sensor is still alive in the simulation: Actor 642 (sensor.other.collision) Fatal Python error: (pygame parachute) Segmentation Fault

Current thread 0x00007f40067fc700 (most recent call first):

Thread 0x00007f4098ff4740 (most recent call first): Aborted (core dumped)

Any hints on what might be wrong?

cpacker commented 2 years ago

@zzx9636 I noticed that the octomap subdirectory checked into your repo seems to be missing the src folder - could that be a possible issue?

If so, could you try committing and adding all subdirectories recursively in ThirdParty? Maybe that will help isolate the issue.

Thanks for helping us debug!

zzx9636 commented 2 years ago

Just pushed. Can you guys @cpacker @JeffTheHacker try it out? OcTree is a class defined by the octomap, and I think it may be related to which version of octomap you are using. I could be wrong, but if you use the octomap that shipped with ROS, it may lead to some issues.

BTW, I apologize for all those messes in my repo. If I got time during the winter, I will try to rewrite it.

JeffTheHacker commented 2 years ago

Hi @zzx9636, thank you for making the modifications. Upon recloning the repo and attempting to rerun the experiments, I encountered the following error:

Traceback (most recent call last): File "test_intersection.py", line 4, in from mapping import MapViewer File "/Safe_Occlusion_Aware_Planning-main/mapping/init.py", line 4, in from .occupancy_map import OccupancyMap File "/Safe_Occlusion_Aware_Planning-main/mapping/occupancy_map.py", line 17, in import octomap ImportError: libdynamicedt3d.so.1.9: cannot open shared object file: No such file or directory

I double checked that I have installed libdynamicedt3d as well as attempted multiple reinstalls of octomap-python, but didn't seem to make it work. I wonder if you have encountered this error before? Thanks in advance!

166wsl commented 2 weeks ago

There is a error while running collect_lidar_data.py as following: Traceback (most recent call last): File "collect_lidar_data.py", line 48, in occupancy_map.visualize() File "/home/wsl/carla/CARLA_0.9.11/PythonAPI/Safe_Occlusion_Aware_Planning-main/mapping/occupancymap.py", line 91, in visualize occupied, = self.octree.extractPointCloud() File "octomap/octomap.pyx", line 510, in octomap.OcTree.extractPointCloud File "octomap/octomap.pyx", line 262, in iter AttributeError: 'octomap.leaf_iterator' object has no attribute '_leaf_iterator__is_end'

I wonder if you have encountered this error before and konw how to solve it? Thanks a lot in advance!