Boundaries of a road
Boundaries of a road
Hey,
I have imported a road into vrep and now i want define boundaries so that I can tell a car that it is meant to remain on the road . What would be the best approach for this?
I have imported a road into vrep and now i want define boundaries so that I can tell a car that it is meant to remain on the road . What would be the best approach for this?
Re: Boundaries of a road
Hello,
you could mount various type of sensors to your car (e.g. vision or proximity). Another option would be build a 2D map of the scene, which indicates where the boundaries are. But in order to build that map, you would also need some sort of sensor.
Have a look at this example scene for instance.
Cheers
you could mount various type of sensors to your car (e.g. vision or proximity). Another option would be build a 2D map of the scene, which indicates where the boundaries are. But in order to build that map, you would also need some sort of sensor.
Have a look at this example scene for instance.
Cheers
Re: Boundaries of a road
Hey Coppelia,
thanks for the suggestion but i was looking for something where I could just define the road as a valid region and everything else as and invalid region. any suggestions and directions as to how to go about it?
Thanks
thanks for the suggestion but i was looking for something where I could just define the road as a valid region and everything else as and invalid region. any suggestions and directions as to how to go about it?
Thanks
Re: Boundaries of a road
That was my suggestion by using a map (the map will tell you what region is valid, and what region is invalid). But someone needs to create that map. Once you have the map, your vehicle can check its position relative to that map and try to avoid forbidden regions.
Cheers
Cheers
Re: Boundaries of a road
Hey Coppelia,
Thanks for the clarification. How would we get the map data and then how do we use the map data to differentiate.
Thanks for the clarification. How would we get the map data and then how do we use the map data to differentiate.
Re: Boundaries of a road
since the vision sensor gives us an image would the solution to basically indicate based on the colors in the map? ie black and white
Re: Boundaries of a road
Yes. The solution is basically the example file I mentioned in my previous post.
Cheers
Cheers
Re: Boundaries of a road
Hey , Coppelia I wanted to know how you were able to get the object position wrt to the image generated by the vision sensor
Re: Boundaries of a road
You would do something like:
Cheers
Code: Select all
local absolutePosition={1,1,1}
local m=simGetObjectMatrix(visionSensorHandle,-1)
local mi=simInvertMatrix(m)
local relativePosition=simMultiplyVector(mi,absolutePosition)