Giter VIP home page Giter VIP logo

Comments (3)

YuqiHuai avatar YuqiHuai commented on June 18, 2024 1

可能还需要修改一下HD Map上每条道的限速。您试试这个代码

from baidu_apollo_proto.proto_v8.modules.common_msgs.map_msgs.map_pb2 import Map

map = Map()

with open("sunnyvale_big_loop.bin", "rb") as f:
    map.ParseFromString(f.read())

for lane in map.lane:
    print(lane.id.id, round(lane.speed_limit, 2))
    lane.speed_limit = 1000

with open("crazy_sunnyvale_big_loop.bin", "wb") as f:
    f.write(map.SerializeToString())

with open("crazy_sunnyvale_big_loop.bin", "rb") as f:
    map.ParseFromString(f.read())
for lane in map.lane:
    print(lane.id.id, round(lane.speed_limit, 2))

https://pypi.org/project/baidu-apollo-proto/

地图太大了我没法上传到GitHub,但是上面那个代码应该可以把 sunnyvale_big_loop 上的速度上限改掉。

from apollo.

Elken-lab avatar Elken-lab commented on June 18, 2024

可能还需要修改一下高清地图上每条道的限速。您尝试一下这个代码

from baidu_apollo_proto.proto_v8.modules.common_msgs.map_msgs.map_pb2 import Map

map = Map()

with open("sunnyvale_big_loop.bin", "rb") as f:
    map.ParseFromString(f.read())

for lane in map.lane:
    print(lane.id.id, round(lane.speed_limit, 2))
    lane.speed_limit = 1000

with open("crazy_sunnyvale_big_loop.bin", "wb") as f:
    f.write(map.SerializeToString())

with open("crazy_sunnyvale_big_loop.bin", "rb") as f:
    map.ParseFromString(f.read())
for lane in map.lane:
    print(lane.id.id, round(lane.speed_limit, 2))

https://pypi.org/project/baidu-apollo-proto/

地图突然出现了我无法上传到GitHub的情况,但是上面的代码可以把sunnyvale_big_loop上的速度上限改掉。

好的,我试试,谢谢!!!

from apollo.

ershang2 avatar ershang2 commented on June 18, 2024

可能需要修改一下高清地图上每条道的限制。你可以试试这个代码

from baidu_apollo_proto.proto_v8.modules.common_msgs.map_msgs.map_pb2 import Map

map = Map()

with open("sunnyvale_big_loop.bin", "rb") as f:
    map.ParseFromString(f.read())

for lane in map.lane:
    print(lane.id.id, round(lane.speed_limit, 2))
    lane.speed_limit = 1000

with open("crazy_sunnyvale_big_loop.bin", "wb") as f:
    f.write(map.SerializeToString())

with open("crazy_sunnyvale_big_loop.bin", "rb") as f:
    map.ParseFromString(f.read())
for lane in map.lane:
    print(lane.id.id, round(lane.speed_limit, 2))

https://pypi.org/project/baidu-apollo-proto/

地图很方便我把地图上传到GitHub,但是上面那个代码应该可以把sunnyvale_big_loop上学期的课程改掉。

Very handy tool

from apollo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.