huawei-noah / SMARTS

Scalable Multi-Agent RL Training School for Autonomous Driving
MIT License
951 stars 190 forks source link

[Help Request] RLidar's output #2163

Open dduro2020 opened 1 month ago

dduro2020 commented 1 month ago

High Level Description

After checking the lidar output and using matplotlib I get values that are difficult to interpret, in fact, they make no sense to me.

The compute_point_cloud function in lidar.py is supposed to return a 3d array of points, so the raw output should be interpretable. Someone correct me if I'm wrong, I can't make progress on my project if I can't use lidar.

code:

"""Generate a point cloud.
        Returns:
            Point cloud of 3D points, a list of hit objects, a list of rays fired.
        """

Version

Latest.

Operating System

Ubuntu 22.04

Problems

This is what I get after making two measurements with an obstacle at 3 metres and another at 5 metres. I am not sure if the obstacle is on the y-axis or the x-axis, but the output does not resemble reality.

Figure_1

Here is an example of code:

agent_interface = AgentInterface(
        action=ActionSpaceType.Direct,
        max_episode_steps=max_episode_steps,
        neighborhood_vehicle_states=True,
        waypoint_paths=True,
        road_waypoints=True,
        drivable_area_grid_map=True,
        occupancy_grid_map=True,
        top_down_rgb=True,
        lidar_point_cloud=True,
        accelerometer=True,
        lane_positions=True,
        signals=True,
    )

How I get the data:

print(f"RLidar: {observation['lidar_point_cloud']}")
dduro2020 commented 1 month ago

@Gamenot