Comments (13)
@WenchaoDing
Indeed the orientation of the lanes is encoded in the third value (second index) of the RGB-value.
You can observe this, when you pick this value of a specific point of a turn in the road (e.g. "Town01Lanes.png") and perform a small variation.
from carla.
@yanii That is not currently available. However on the next release we will give users access to a map. That will allow you to get the car position within the lane. This is probably helpful for your needs. To get access early watch the "new_client_api" branch. It will be there by today or tommorrow.
@xl-sr We try to provide only primary measurements. You could program the IsThereAnObstacleAhead function by getting the player's position and orientation and comparing with the position of all agents in the simulator.
from carla.
@FitashUlHaq You can get all the waypoints at the center using this so what I do is save the waypoints of the whole map in a text file and query from that text file the nearest waypoint from the car center
world.get_map().get_waypoint_xodr(road_id,lane_id,s).next_until_lane_end(1.0)
This will give waypoint till the lane end 1m apart from each other. For further info do check carla.Map
Hope this helps
from carla.
Yes, I am interested in this too.
Other measurements would be helpful as well, e.g. the output from the AI controller function IsThereAnObstacleAhead()
from carla.
@xl-sr IsThereAnObstacleAhead() is an internal function fine-tuned for the current autopilot and its results may not be very intuitive. Like there are several magic numbers that just work with the current autopilot, only detects dynamic obstacles, and detects pedestrians way before they are on the road.
from carla.
ok thanks. I think the approach of comparing the agents positions will give me what I want to achieve.
from carla.
Hi @felipecode ,
I am writing some function to calculate the distance to the lane left boundary and the right boundary, and I notice your implementation:
ori = self.map_image_lanes[int(pixel[1]), int(pixel[0]), 2]
ori = ((float(ori) / 255.0)) * 2 * math.pi
return (-math.cos(ori), -math.sin(ori))
I am confused about why you can obtain the lane orientation by reading from one channel of the image. Is there any format encoded? Could you please provide any hint on how to implement my function efficiently? Thanks in advance.
from carla.
Yes, the image has encoded the information of the road
carla/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/MapGen/RoadMap.cpp
Lines 50 to 63 in 60a114e
I was printing this for debugging purposes then @felipecode started using it in his planner 😀, just keep in mind that in the conversion to PNG may be some losses so the info won't be 100% accurate.
@felipecode Also, the image inside the planner is an old one, we improved the precision of turns an intersections.
from carla.
I thinks "Distance from Centre of Lane" is available in the latest release (0.8)?
from carla.
Hi,@WenchaoDing
How did you get the Distance from Centre of Lane.I want to get it but i don't know how to get it.
from carla.
Hello,@nsubiron Nice to meet u again.
I have a problem that if I want to print the orientation of the lanes at screen(Fcolor[2]).How should i do?
from carla.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from carla.
Hi, is there any update on this? I tried getting the distance between ego vehicle and way-point at the center of the road but no success
from carla.
Related Issues (20)
- Vehicle Improvement (Firetruck / European HGV)
- Vehicle Improvement (Sprinter)
- Vehicle Improvement (Mustang 66)
- Carla setup help
- Carla Setup Help HOT 1
- Implementation of CARLA-Trained Models on Physical Vehicles
- Carla UE4 Server crash HOT 5
- make PythonAPI error [FAILED: src/CMakeFiles/xerces-c.dir/xercesc/util/regx/RegxParser.cpp.o ][20 errors generated. ninja: build stopped: subcommand failed.]
- Ensure condition failed, can't launch Carla HOT 9
- Vegetation Shader
- Palm tree
- Grass
- Trees
- FanPalm
- Bush
- FlowerPot 1
- Fallen leaves
- Streetlights Intensities
- Readjust the post-process volume to the new lighting setup.
- Create different weather profiles presets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carla.