Accident Avoidance

175 views
Skip to first unread message

Rohan Patil

unread,
Sep 3, 2015, 2:17:57 AM9/3/15
to OMNeT++ Users
Hello, Is there any way to decrease the speed of vehicle on receiving a message? The purpose is that I want to simulate collision avoidance for vehicle in Veins. The front vehicle in the platoon will send the message to the vehicles at the back. On receiving the message, the vehicles at the back should slow down and eventually stop, as I want the number of the vehicles which unfortunately collided and which are safe at the end. I think I'll need to write the code in handleMessage, but exactly what I need to write is confusing me. Please help.

Rens van der Heijden

unread,
Sep 3, 2015, 3:13:07 AM9/3/15
to OMNeT++ Users
You can change the speed of vehicles using TraCI (the protocol used by VEINS to talk to SUMO), as mentioned here:
http://veins.car2x.org/documentation/modules/
In the Veins Tutorial example, the speed is changed indirectly by changing the route (and this means that SUMO takes care of the vehicle driving behavior).

Regarding message processing, I suspect you'll want to use the onData(), assuming your code is extending the BaseWaveApplLayer class provided by VEINS. This is because that class already contains code to separate beacons from data, and you can then use data messages (i.e., non-periodic messages) to communicate an emergency as you describe. See these sections of code:
https://github.com/sommer/veins/blob/master/src/veins/modules/application/ieee80211p/BaseWaveApplLayer.cc#L102-L117
https://github.com/namnatulco/veins/blob/master/src/veins/modules/application/traci/TraCIDemo11p.cc#L47-L74

Regarding platooning, there is actually already some work on that. I'm not sure whether this is what you're looking for, but there is a Platooning extension for VEINS by Michele Segata:
http://plexe.car2x.org/
They also have a tutorial on how to implement maneuvers:
http://plexe.car2x.org/tutorial/example3/

Rohan Patil

unread,
Sep 3, 2015, 7:39:16 AM9/3/15
to omn...@googlegroups.com
Thank you Sir. I'll study the resources thoroughly.

--
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/OpKBpmVJT28/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.



--
ROHANN

Rohan Patil

unread,
Sep 8, 2015, 2:33:13 AM9/8/15
to omn...@googlegroups.com
Dear Rens, I went through the resources. I wanted to ask whether we can know if the message received by a car has come from the vehicle in front of it or from some vehicle at the back, as I want to build an efficient broadcast protocol which will not unnecessarily forward the message to all other vehicles as soon as it received one.
--
ROHANN

Rens van der Heijden

unread,
Sep 8, 2015, 6:48:16 AM9/8/15
to OMNeT++ Users
Hi,

You could implement some kind of position-based forwarding yourself; alternatively there might be some implementations available from the MANET community -- check the INET Model Catalog:
https://inet.omnetpp.org/Protocols.html

Please note there is a lot of research/researchers out there doing this -- I recommend doing some state of the art analysis before implementing all this yourself.

Regards,
Rens

Rohan Patil

unread,
Feb 14, 2016, 4:26:30 AM2/14/16
to omn...@googlegroups.com
Dear Rens, Hello, I want to simulate a highway scenario for accident detection. The tutorial that came with Veins broadcasts the message to all the vehicles in the simulation. But I want to show the forwarding of the message specifically between the subsequent vehicles. What should I do if I want that only the next few vehicles receive the message sent by the car in front of the platoon and then one of those vehicles send it further and so on? Please suggest me as I am new to Veins.

Minnu

unread,
Nov 4, 2016, 9:42:02 AM11/4/16
to OMNeT++ Users
Hello Rohan,

Were you able to simulate a collision?  I am trying to simulate a collision as well, and would really appreciate your help on the same.

Thanks!
Reply all
Reply to author
Forward
0 new messages