-
Notifications
You must be signed in to change notification settings - Fork 373
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
Add nuScenes-based lidar examples #4407
Conversation
point_distances = np.linalg.norm(points, axis=1) | ||
point_colors = cmap(norm(point_distances)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to distance based color mapping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
examples/python/nuscenes/main.py
Outdated
sensor_name = sample_data["channel"] | ||
calibrated_sensor_token = sample_data["calibrated_sensor_token"] | ||
calibrated_sensor = nusc.get("calibrated_sensor", calibrated_sensor_token) | ||
rotation_xyzw = np.roll(calibrated_sensor["rotation"], shift=-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment on why you do the shift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
examples/python/nuscenes/main.py
Outdated
parser.add_argument( | ||
"--root_dir", | ||
type=pathlib.Path, | ||
default="dataset", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense for this dataset dir to default to <script dir>/dataset ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realized I accidentally left all my comments as "single comment", sorry! Either way, lgtm!
Actually, one more question after playing with it: is the nuScenes dataset missing an annotation context? |
It would also be cool to log a car mesh that moves around where the car is supposed to be but definitely ok to skip |
I just tried adding an annotation context, but the labels are taking a lot of space. Is there any benefit in having the annotation context with just the ids? Some classes get the same color right now, but it's quite rare; I'm not sure if that warrants adding manual colors for all classes. |
Do you mean they take a lot of visual space in the 3D scene? In that case we should probably make showing the labels in 3D optional. It's still useful to be able to hover over the bbox and see what class it is. Could you open an issue? |
Do I need to do something special to run this?
(Python 3.10.12) |
Hm, that's strange. I didn't need anything else. I guess I think the error you're getting might be from another requirements file (ros_node) and then it doesn't even attempt to install the other requirements? |
Oh yeah, I was |
What
Adds two new examples based on the nuScenes dataset. One example visualizing most of the data (lidar, radar, camera, and 3D bounding boxes) in the nuScenes dataset, and a more minimal example that only visualizes the lidar data in the lidar reference frame.
Lidar example
nuScenes example
The download module is included in both examples for now; if we have a place so this could be shared across examples, that would be nice.
Closes #2510.
Checklist