nuScenes Map Expansion Tutorial
创始人
2024-06-02 14:18:25
0

nuScenes Map Expansion Tutorial

    • 0.引言
    • 1.Google colab
    • 2.初始化加载地图
    • 3.Visualization
    • 4.Navigation
    • 5.other

0.引言

  • 官方教程学习记录

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

1.Google colab

本地配置还是比较麻烦,使用官方的教程进行学习,官方的教程是基于colab的。

  • colab学习参考
  • colab学习参考

我的云盘:
在这里插入图片描述

挂载Google云盘:

from google.colab import drive
drive.mount('/content/drive/')
import os
os.chdir('/content/drive/My Drive/')
!pwd

运行时会提示:

在这里插入图片描述

2.初始化加载地图

!pip install nuscenes-devkit &> /dev/null  # Install nuImages.import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
import tqdm
import numpy as npfrom nuscenes.map_expansion.map_api import NuScenesMap
from nuscenes.map_expansion import arcline_path_utils
from nuscenes.map_expansion.bitmap import BitMap
from google.colab import drive
drive.mount('/content/drive/')
import os
os.chdir('/content/drive/My Drive/')
!pwd
nusc_map = NuScenesMap(dataroot='/content/drive/My Drive/data/sets/nuscenes', map_name='singapore-onenorth')

3.Visualization

  • Rendering multiple layers
    在这里插入图片描述
  • Rendering the lidar basemap

Rendering the lidar basemap
New: We can render the HD lidar basemap used for localization. The basemap is a bitmap image that can be underlaid for most functions (render_centerlines, render_egoposes_on_fancy_map, render_layers, render_map_patch, render_next_roads, render_record). The same BitMap class can also be used to render the semantic prior (drivable surface + sidewalk) from the original nuScenes release. Note that in this visualization we only show the lane annotations for better visibility.

在这里插入图片描述

  • Rendering a particular record of the map layer
    在这里插入图片描述

  • Rendering binary map mask layers
    在这里插入图片描述

在这里插入图片描述

  • Rendering map layers on top of camera images
!pip install nuscenes-devkit &> /dev/null  # Install nuImages.import matplotlib.pyplot as plt# Init nuScenes. Requires the dataset to be stored on disk.
from nuscenes.nuscenes import NuScenes
from google.colab import drive
drive.mount('/content/drive/')
import os
os.chdir('/content/drive/My Drive/')
!pwd
nusc = NuScenes(version='v1.0-mini', dataroot='/content/drive/My Drive/data/sets/nuscenes', verbose=True, map_resolution=1)# Pick a sample and render the front camera image.
sample_token = nusc.sample[9]['token']
layer_names = ['road_segment', 'lane', 'ped_crossing', 'walkway', 'stop_line', 'carpark_area']
camera_channel = 'CAM_FRONT'
nusc_map.render_map_in_image(nusc, sample_token, layer_names=layer_names, camera_channel=camera_channel)

在这里插入图片描述

  • Rendering ego poses on the map
    在这里插入图片描述

4.Navigation

We also provide functions for navigation around the road network. For this purpose, the road layers lane, road_block and road_segment are especially useful (see definitions below). The get_next_roads(x, y) function looks at the road layer at a particular point. It then retrieves the next road object in the direction of the lane or road_block. As road_segments do not have a direction (e.g. intersections), we return all possible next roads.

在这里插入图片描述

  • Working with Lanes

For the prediction challenge we added connectivity information to the map expansion (v1.2) to efficiently query which lane is connected to which other lanes. Below we render the lane and lane_connector objects. The lanes and lane_connectors are defined by parametric curves. The resolution_meters parameter specifies the discretization resolution of the curve. If we set it to a high value (e.g. 100), the curves will appear as straight lines. We recommend setting this value to 1m or less.

在这里插入图片描述

  • Data Exploration

Let’s render a particular patch on the map:
在这里插入图片描述

  • Polygon

在这里插入图片描述

  • Drivable Area

Drivable area is defined as the area where the car can drive, without consideration for driving directions or legal restrictions. This is the only layer in which the record can be represented by more than one geometric entity.
Note: On some machines this polygon renders incorrectly as a filled black rectangle.

在这里插入图片描述

If we render this road segment we can see that it is indeed an intersection:

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

5.other

其实我更好奇他是如何将数据转换为json文件的?

相关内容

热门资讯

春天的小学四年级作文300字... 春天的小学四年级作文300字 篇一:春天里的花海春天是一个美丽的季节,它给大地披上了五彩斑斓的外衣。...
我学会了洗衣服四年级作文(精... 我学会了洗衣服四年级作文 篇一我学会了洗衣服在我四年级的时候,我学会了洗衣服。这是一个令人兴奋又有趣...
我的朋友四年级作文500字【... 我的朋友四年级作文500字 篇一:快乐的小伙伴我有一个非常好的朋友,他叫小明。小明是我的同班同学,也...
写快乐的春节小学作文【最新6... 写快乐的春节小学作文 篇一快乐的春节春节是我最喜欢的节日,因为在这个特别的日子里,我可以和家人一起欢...
管门口的金毛四年级作文【推荐... 管门口的金毛四年级作文 篇一我家门口有一只非常可爱的金毛犬,它是我们的守门员,每天都在门口忠实地守卫...
我的压岁钱小学四年级作文【通... 我的压岁钱小学四年级作文 篇一我的压岁钱春节是我最喜欢的节日,因为我可以收到压岁钱。每年过年的时候,...
致那份友谊小学作文(推荐3篇... 致那份友谊小学作文 篇一友谊的力量亲爱的友谊小学的老师们和同学们:我是一名来自友谊小学的学生,今天我...
为自己喝彩小学生作文【精简6... 为自己喝彩小学生作文 篇一我是一名小学生,每天都在学校度过快乐的时光。我喜欢上学,因为学校给了我很多...
我生病了小学作文【精简6篇】 我生病了小学作文 篇一我生病了前几天,我不知道怎么了,突然感觉身体不舒服。我感到头晕目眩,喉咙痛得像...
新学期新打算小学作文450字... 新学期新打算篇一:我要努力学习新的学期开始了,我制定了新的打算,那就是要努力学习。我相信只有努力学习...
我学会了西红柿炒鸡蛋小学作文... 我学会了西红柿炒鸡蛋小学作文 篇一我学会了西红柿炒鸡蛋上周,我学会了一道简单又美味的菜——西红柿炒鸡...
花朵的小学作文【最新3篇】 花朵的小学作文 篇一花朵的奇妙世界花朵是大自然的美丽礼物,它们以各种各样的颜色和形状装点着我们的环境...
小学生赏花的作文【通用4篇】 小学生赏花的作文 篇一春天是一个充满美丽花朵的季节,我非常喜欢春天。每当春天来临,我就会和家人一起去...
中秋之夜小学生作文【优选3篇... 中秋之夜小学生作文 篇一中秋之夜,月亮圆圆的,像一块白玉挂在天空中。我和爸爸妈妈一起出门,欣赏美丽的...
油面筋塞肉小学作文(推荐3篇... 油面筋塞肉小学作文 篇一我喜欢吃美食,尤其是一些特色的小吃。最近,我发现了一种非常好吃的小吃,那就是...
学游泳的小学作文(实用3篇) 学游泳的小学作文 篇一学游泳的小学作文大家好!我是小明,今天我要给大家分享一下我学游泳的经历。我是一...
小学生作文老师我想对你说【最... 小学生作文老师我想对你说 篇一尊敬的老师:您好!我是您的学生小明。我想借这篇作文向您表达我的感激之情...
一次有趣的实验小学生作文80... 一次有趣的实验篇一昨天,我参加了一次非常有趣的实验。老师让我们小组一起进行,我非常期待这个实验的结果...
春天小学一年级作文300字【... 春天小学一年级作文300字 篇一我的春天春天来了,大地上百花盛开,绿草如茵。我喜欢春天,因为春天是个...
校园的一角的作文【优选6篇】 校园的一角的作文 篇一校园的一角在校园的一角,有一个小花园,是我最喜欢的地方。虽然它不大,但却别有一...