SMARTS icon indicating copy to clipboard operation
SMARTS copied to clipboard

[Help Request] RLidar's output

Open dduro2020 opened this issue 1 year ago • 1 comments

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 avatar Oct 16 '24 23:10 dduro2020

@Gamenot

dduro2020 avatar Oct 17 '24 15:10 dduro2020