Modeling an application in VEINS

3,108 views
Skip to first unread message

Márcio Barbosa

unread,
Jul 29, 2014, 6:30:39 PM7/29/14
to omn...@googlegroups.com
Hello,

I'm currently studying Veins, SUMO, OMNET++, INET and MIXIM as to be able to configure a scenario where I can model an application (content downloading, p2p communication, etc).
I've already followed the Veins tutorial and managed to successfully install everything and run the simulations. I've also learned how to get my own maps and use them along with veins, through route generation using sumo tools...

Now, I have a few questions that have come to mind:
- I read somewhere in this group that Veins, being a part of (or closer to) MIXIM, currently don't allow me to use the TCP, UDP, and other resources available in INET. Is it true/accurate?

- How can I implement my own application in a vehicular scenario? From what I've seen in veins 2.2 (I've tested both 2.2 and 3.a3), cars share some kind of message about accidents and also compute CO2 emission... Where were these things defined? From the tic toc tutorial on omnet, I'd supposed this was implemented in C++, but where are these files? By accessing them and extending them, I could, for example, model or define communication between cars as to simulate content download, right?

I'm sorry if some of these sound dumb, I just hope I get "unstuck" and make some more progress.
Thanks in advance.

Christoph Sommer

unread,
Jul 30, 2014, 3:32:03 AM7/30/14
to omn...@googlegroups.com
Dear Márcio,

Glad to hear everything is working as it should!

Márcio Barbosa wrote:
> - I read somewhere in this group that Veins, being a part of (or closer
> to) MIXIM, currently don't allow me to use the TCP, UDP, and other
> resources available in INET. Is it true/accurate?

Version 3 alpha 3 of Veins is based on MiXiM, so it uses different
interfaces between modules than those in INET -- as well as different
modules for modeling mobility and the physical layer.

The next version of Veins will be based on INET again (which is in the
process of being modified to rely on MiXiM as well), so this will become
a non-issue.

In the meantime, I see two possible ways:

A) You can freely use modules from the INET Framework and from Veins 3
in the same simulation, but there is no easy way to connect modules from
one to the other: You will need to write a new module that allows
connecting the INET TCP module to the Veins WAVE MAC module.

B) Version 2.4.0 of The INET Framework includes many modules from Veins:
TraCI (coupling OMNeT++ and SUMO), Obstacles (modeling buildings
blocking radio communication), and Annotations (drawing lines etc on the
OMNeT++ canvas) have all been ported from Veins to INET. If you do not
need a WAVE communication stack, this might be sufficient to model your
scenario.


> - How can I implement my own application in a vehicular scenario? From
> what I've seen in veins 2.2 (I've tested both 2.2 and 3.a3), cars share
> some kind of message about accidents and also compute CO2 emission...
> Where were these things defined?

The Veins example uses an application layer module called
`TraCIDemo11p'. You can find its implementation in the main source tree.
For example, [1] is the line of code that sends a warning message after
a car was stopped for too long and [2] is the line of code that lets
other cars react to this warning message by avoiding a particular road.

If you have any more questions, I will be happy to help.

Best,

Christoph


[1]
https://github.com/sommer/veins/blob/veins-3a3/src/modules/application/traci/TraCIDemo11p.cc#L92

[2]
https://github.com/sommer/veins/blob/veins-3a3/src/modules/application/traci/TraCIDemo11p.cc#L52

--
Dr. Christoph Sommer
Distributed Embedded Systems Group
University of Paderborn, Germany
http://www.ccs-labs.org/~sommer/

Márcio Barbosa

unread,
Jul 30, 2014, 8:28:49 PM7/30/14
to omn...@googlegroups.com
Thank you, Cristoph, it was very helpful.

I have one more question, though.
I decided option B) would be the best in my case, and tried to run the traci_launchd under inet/examples. I'm currently running OMNET 4.4.1, INET 2.4.0 and SUMO 0.19.0 under Ubuntu 14.04.

I've received this error: 
"<!> Error in module (TraCIScenarioManagerLaunchd) scenario.manager (id=3) at event #1, t=0: Model error: TraCI server "SUMO 0.19.0" reports API version 7. This server is unsupported..

TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?

Simulation terminated with exit code: 133..."

I saw that you and other people already solved this issue when dealing with veins, either by using another sumo version, or another veins version. I've tested this in both INET 2.4 and 2.3 and got the same results.
Do you know what sumo version I should use along with INET 2.4? Would replacing TraCIScenarioManager.cc and TraCIScenarioManager.h  and rebuilding the project, as suggested in [1] solve my problem? Or should I use an entirely different version of INET?

Best,
Márcio Vinícius Barbosa




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

Christoph Sommer

unread,
Jul 31, 2014, 6:40:45 AM7/31/14
to omn...@googlegroups.com
Dear Márcio,

Márcio Barbosa wrote:
> TraCI server "SUMO 0.19.0" reports API version 7. This server is
> unsupported..
> [...]
> Do you know what sumo version I should use along with INET 2.4?

If I read the code correctly, INET 2.4 accepts TraCI servers with an API
version of either 2 or 3.

If I recall correctly, SUMO 0.14.0 used API version 3, so this should be
a safe bet.


> Would replacing *TraCIScenarioManager.cc* and *TraCIScenarioManager.h * and
> rebuilding the project, as suggested in [1] solve my problem? Or should
> I use an entirely different version of INET?

As far as I know, the Veins modules in INET have not been updated since
their initial port. Maybe somebody else is providing updated modules,
but I am not aware of anyone. Porting the modules from Veins 3 alpha 1
(that is, veins-3a1; not the newest version) should be possible with
small changes, though.

Depending on your project, SUMO 0.14.0 might also be recent enough, so
just downloading and using that should work out alright.

Best,

Christoph

Márcio Barbosa

unread,
Aug 1, 2014, 12:16:27 PM8/1/14
to omn...@googlegroups.com
Thank you, again, Cristoph, SUMO 0.14 worked!

If anyone else is wondering how to make it work, here's what needs to be done to, at least, launch traci_launchd example under INET version 2.4:

1 - Download SUMO 0.14.0 from the official website.
2 - Install, using apt-get, etc, the following libraries:
libproj-dev libxerces-c-dev libfox-1.6-dev libgl1-mesa-dev libglu1-mesa-dev
3 - Depending on your version of GCC, you'll need to add "#include <unistd.h>" on socket.cpp, as seen here:
4 - After that, if you get errors on ./configure, complaining about not finding libGL, lpthread, etc, try this:

./configure --with-fox-includes=/usr/include/fox-1.6 --with-gdal-includes=/usr/include/gdal --with-proj-libraries=/usr --with-gdal-libraries=/usr --with-proj-gdal LIBS="-lGLU -lpthread lGL

5 - make

6 - While trying launch tracilaunchd example in inet, if you get an error about IPV4Configurator, just add this to omnetpp.ini
**.networkLayer.configurator.networkConfiguratorModule = ""

I think those were all the problems I've faced and their respective solutions.


William Angeles

unread,
Mar 11, 2015, 5:38:07 PM3/11/15
to omn...@googlegroups.com
Dear Dr. Christoph Sommer,
-
I have been working some weeks on Veins because I'm trying to develop a routing protocol for VANETS. Then I need an App ----> TCP or UDP----> Network-AdHoc-Routing Protocol ---->WAVE MAC and PHY(802.11p) modules, so I need to assemble the upper level modules of INET and the WAVE phy of VEINS, I already try to do that directly but some error appear during the simulations so I think is not the optimal choice, so my question is if the only way to implement this host is to develop my own module  that allows connecting the INET module to the Veins WAVE MAC module as you said before ??? or now exist another project of framework where are working this issue???

Thanks in advance.

William Angeles
Federal Technological University of Paraná - UTFPR

Raphael Riebl

unread,
Mar 12, 2015, 7:10:25 AM3/12/15
to omn...@googlegroups.com
Dear William,

you might be interested in my fg-ivc-2015 branch of Veins [1].
It allows you to equip vehicles with INET protocol layers (2.99+) and
control vehicle movement through Veins' more up-to-date TraCI code.
In the accompanying example/inet folder, INET's PHY and MAC layers are
configured for 802.11p operation, but there is e.g. no channel switching
as in Veins' MAC implementation. Depending on your particular needs,
however, INET's PHY and MAC might be sufficient.

Best regards,
Raphael

[1] https://github.com/riebl/veins/commits/fg-ivc-2015

William Angeles

unread,
Mar 17, 2015, 11:37:32 AM3/17/15
to omn...@googlegroups.com
Dear Raphael,

Thanks for your help, the last few days I tried and search anything that could help me in the task of work with VEINS and INET, but unfortunately I did not found anything and right now I'm testing your fg-ivc-2015,  although I would test with WAVE layers I think that work with just 802.11p with no channel switching is sufficient for my routing research, and if some doubts appear on the road, I ask for your kind support.

Thanks for all.

William Angeles



William Ángeles Galván

--
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.

Murat Coşkun

unread,
Mar 23, 2015, 7:40:06 PM3/23/15
to omn...@googlegroups.com, raphae...@thi.de
Dear Rapheal,

I would like to setup a simulation environment that UDP/TCP packets are sent from RSU to vehicles by using 802.11p physical layer. The Veins example would be suitable for my scenario if UDP/TCP packets transmission was possible. You have recommended fg-ivc-2015 branch to Mr. William. Do you recommend the fg-ivc-2015 branch for my scenario? If you recommend it, How should I provide UDP/TCP pacets transmission in Veins example or how can I setup a new simulation? 

I would appreciate it, If you could please help me. 

Best,
Murat Coskun

12 Mart 2015 Perşembe 13:10:25 UTC+2 tarihinde Raphael Riebl yazdı:

Raphael Riebl

unread,
Mar 24, 2015, 5:33:45 AM3/24/15
to Murat Coşkun, omn...@googlegroups.com
Dear Murat,

I'm confident that you can use the fg-ivc-2015 branch for this, but I can't
tell if it's the best option for you. My fg-ivc-2015 branch allows you to use
a recent version of Veins, which has a more up-to-date implementation of TraCI
compared to INET, together with a recent version of INET, i.e. 2.99 and beyond
(a.k.a. integration branch). However, unmodified versions of Veins also work
with INET 2.3 out of the box. Furthermore, it might be sufficient for your
simulation to use INET standalone as it includes some (albeit out-dated) TraCI
code as well. It all depends on what you are trying to achieve and which
features you need. From my point of view, using "official" Veins with INET 2.3
is probably the easiest way to go.

Best regards,
Raphael

William Angeles

unread,
Mar 25, 2015, 3:05:01 PM3/25/15
to omn...@googlegroups.com, raphae...@thi.de
Dear Raphael,

After left running the examples/inet/omnetpp.ini on veins-fg-ivc-2015 I have a crash I don't discover yet what is the problem. near the 270 second of simulation the windows just closed and after probe the debug option some error appear and they are:
         
         (gdb)
         *Program received signal SIGSEGV, Segmentation fault.
          0x00007ffff108b4fa in inet::physicallayer::RadioMedium::computeMaxSpeed (this=0x304fc20) at inet/physicallayer/common/RadioMedium.cc:486
          486        maxSpeed = maxIgnoreNaN(maxSpeed, mps((*it)->getAntenna()->getMobility()->getMaxSpeed()));
          [Thread 0x7fffefb32700 (LWP 21526) exited]
          
         Program terminated with signal SIGSEGV, Segmentation fault.
         The program no longer exists.
         Quit

I realized that the problem appears when one of the nodes(the cars) left the simulation(after complete their path) and some problem occur about that, please could you help me to solve that problem?

Thanks in advance.

William Angeles

Raphael Riebl

unread,
Mar 27, 2015, 9:47:45 AM3/27/15
to William Angeles, omn...@googlegroups.com
Dear William,

I just tried examples/inet with recent INET integration code [1] and
experienced no segfault at computeMaxSpeed.
However, I had to apply a bugfix to INET [2] because of broken IEEE 802.11p
bitrates. Please note that the package location of the used RadioMedium module
has changed recently, i.e. you need to adjust examples/inet/omnetpp.ini:
-import inet.physicallayer.ieee80211.Ieee80211ScalarRadioMedium;
+import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
Could you check if you still face the problem with the same INET version as I
have used?

Best regards,
Raphael

[1]
https://github.com/inet-framework/inet/commit/7bb5eae8d2ca7ae7a7d528ba82d37e40f69edee2
[2] https://github.com/inet-framework/inet/pull/123
Message has been deleted

William Angeles

unread,
Mar 27, 2015, 4:13:05 PM3/27/15
to omn...@googlegroups.com, wang...@gmail.com, raphae...@thi.de
Dear Raphael,

I tried to import and build [1] but some problems appear:
            
           * ambiguous overload for operator<<’ (operand types are std::ostream {aka std::basic_ostream<char>}’ and const char [15]’) veins line 522, external location: /.../omnetpp-4.6/include/cenvir.h C/C++ Problem

It does not permit a correct build and I really don't understand why of this, so I returned to the official Inet 2.99 version.

About my problem I think that the error is in the vector "radios", because after the node[0] left the simulation the vector can't be updated and cause the error, as I show on the attached images.
The first image showed that the vector "radios" still have the node[0] on this list but in that point of the simulation (second 267 as show in second image) the node not exist more on the simulation, but as the radio vector is a const that can't be updated causes problems. This is just a supposition please correct or guide me if I'm wrong.

physicallayer/common/RadioMEdium.h ---> 
std::vector<const IRadio *> radios;

I appreciated some support on this, thanks in advance.

William Angeles.

first.jpg
second.jpg

abdelmounaim ghembaza

unread,
Mar 27, 2015, 5:46:22 PM3/27/15
to omn...@googlegroups.com, wang...@gmail.com, raphae...@thi.de
i want implemant GPSR routing protocole in omnet using inet sumo and veins with ubuntu 14.04
whene w run the simulation i have these error
<!> Error in module (TraCIMobility) Simulation.host[1].mobility (id=38) during network initialization: Model error: ASSERT: condition -M_PI <= angle false in function updateDisplayString, mobility/single/TraCIMobility.cc line 218.

if you can help me
thinks

Raphael Riebl

unread,
Mar 28, 2015, 3:43:55 AM3/28/15
to William Angeles, omn...@googlegroups.com
Dear William,

your assumption is correct and that is the exact reason why you can't
use INET 2.99 but a version after 19th January, when this bug has been
fixed [1].

You can solve the ambiguous overload problem by adding
"cEnvir& operator<<(const char* t) {out << t; return *this;}"
to <OMNETPP_DIR>/include/cenvir.h. I have already reported the same
problem to this mailing list some time ago (3rd February), but I am not
sure if this is the best way to fix it.

Best regards,
Raphael

[1] https://github.com/inet-framework/inet/pull/21


On 03/27/2015 09:13 PM, William Angeles wrote:
> Dear Raphael,
>
> I tried to import and build [1] but some problems appear:
>
> * ambiguous overload for‘operator<<’(operand types are
> ‘std::ostream {aka std::basic_ostream<char>}’and‘constchar[15]’)veins
> line 522,external location:/.../omnetpp-4.6/include/cenvir.h C/C++Problem
>
> It does not permit a correct build and I really don't understand why of
> this, so I returned to the official Inet 2.99 version.
>
> About my problem I think that the error is in the vector "radios",
> because after the node[0] left the simulation the vector can't be
> updated and cause the error, as I show on the attached images.
> The */first image/* showed that the vector "radios" still have the
> node[0] on this list but in that point of the simulation (second 267 as
> show in */second image/*) the node not exist more on the simulation, but
> as the radio vector is a const that can't be updated causes problems.
> This is just a supposition please correct or guide me if I'm wrong.
>
> physicallayer/common/RadioMEdium.h --->
> |
> std::vector<constIRadio*>radios;
> <http://www.ccs-labs.org/~sommer/>

William Angeles

unread,
Mar 30, 2015, 8:49:25 PM3/30/15
to omn...@googlegroups.com, wang...@gmail.com, raphae...@thi.de
Dear Rapahel,

First of all thanks for your kind help, now I'm working with the last version(commit) of INET/integration [1] and the last problem is fixed your examples/inet is ok now, but as I'm going to work on the Network Layer and the Manet routing protocols, I implemented an example similar to traci_lauchd over your branch but selecting an app: UDPBasicBurst, this was my first simulation and all was fine without error, but then add a Manet Routing protocol ( AODVUU), the problem is that at some point the simulation stops and don´t show any hint of the error. Obviously is some problem of AODVUU as shows the attached images, right now I cant say what is the problem but i will work on that and also in modify your Traci80211p App so that it can withstand the NetworkLayer and UDP modules.

Also I tried to build the fg-ivc-2015 branch on Windows also with [1] but some errors appeared:

function 'T* inet::findModuleFromPar(cPar&, cModule*)' definition is marked dllimport ModuleAccess.h /inet/src/inet/common line 66 C/C++ Problem
function 'T* inet::getModuleFromPar(cPar&, cModule*)' definition is marked dllimport ModuleAccess.h /inet/src/inet/common line 88 C/C++ Problem
recipe
for target '../out/gcc-debug/src/veins/base/connectionManager/ChannelAccess.o' failed Makefile /veins line 165 C/C++ Problem

Hope you can help me with some of the problems.

Thanks four all your help.
Best regards.
William Angeles


[1] https://github.com/inet-framework/inet/tree/d9d9a5ed5063659fc22291852a36399b30b68a00
ERRO.jpg
ERRO2.jpg

Raphael Riebl

unread,
Mar 31, 2015, 5:13:04 AM3/31/15
to omn...@googlegroups.com
Dear William,

unfortunately I can't help you with AODVUU because I have never used it so
far. Can you execute INET's AODVUU example without error?
I suppose something is wrong with the INET_IMPORT/INET_EXPORT definitions in
your Windows setup. Since I am using Windows rarely I can't give you a better
hint.

Best regards,
Raphael

bharadwaj - BH

unread,
Apr 6, 2015, 5:38:54 PM4/6/15
to omn...@googlegroups.com, raphae...@thi.de
Dear Friends, 

My name is Banni, I am a student and curiou on VANET project. I am trying to extend the vein in such a way that whenever the lane change is happening in SUMO the accident or event should start i.e a simple message should be sent to other car and I tried in several ways to do that. As a beginning I changed the Traci Mobility like : in the place of accident count I tried to create a new variable with the name laneNumber and  originally it is stated that whenever the accident count is 1 or more than 0 then the vehicle should stop. \. I wrote whenever laneNumber is 2 then the vehicle should stop and gave laneNumber = CommanGetLaneIndex; 


But, I am facing errors .. the simulation stops whenever the vehicle is entering the simualtion. PLease assist me with this.. Your help would encourage me and my friends in several other ways to use the wonderful hybrid simulator veins....Thanks in advance

Thanks and regards.
Banni 

Mima line

unread,
Jul 19, 2015, 1:11:42 PM7/19/15
to omn...@googlegroups.com, raphae...@thi.de, wang...@gmail.com
Hi Mr

I want to use inet +veins to use GPSR protocl

so I am asking you to tell me the stps if you find the solution

thanks in adavance


rakez

unread,
Oct 1, 2015, 9:10:31 AM10/1/15
to OMNeT++ Users
Hi;
     I want to send UDP message along with WSM message in VEINS. I tried to add UDP module in car.ned but there are errors then I tried to make UDPburstapp in application of Veins and define the UDP applicaiton parameters in omnet.ini file but i encounter problems. How can I add the UDP message (first i want to try with UDP burst) along with WSM message in VEINS. 
Can anybody help me? I have been trying to use UDP but i could not implement.

i appreciate your valuable suggestions.

Than you.

rakez

unread,
Oct 5, 2015, 10:44:57 AM10/5/15
to OMNeT++ Users
hello all;
            Have anybody tried to use UDP or anyother message along with WSM message in veins. What are the things we need to consider? I have tried with udp but i encounter problem may be my implementation is wrong. If anybody has implemented or have any idea please suggest. 

thank you.

William Angeles

unread,
Oct 5, 2015, 11:37:25 AM10/5/15
to OMNeT++ Users
Dear Rakez,

If you read all the post here "https://groups.google.com/d/msg/omnetpp/b7vJVZEqlcI/Rwrz_Hrz-6MJ"  Mr Sommer wrote that there is only compatibility between some versions of modules if you want to work with INET and VEINS, also in "https://groups.google.com/d/msg/omnetpp/b7vJVZEqlcI/DLaSz_wiLNcJ" Mr Riebl write about another option to combine them, but in any case you will need to modify some code if you want to combine WSM with UDP.

Best Regards,

William Angeles.
Message has been deleted

FMA

unread,
Nov 2, 2016, 10:39:17 AM11/2/16
to omn...@googlegroups.com
Morning Mr Sommer and everybody,
I'm running Omnet++ v4.6 with both Veins v4.4 and Inet v2.3. I installed then Sumo 0.25.0 which fits well the Veins simulation while I get this error tunning an Inet simulation :

<!> Error in module (TraCIScenarioManagerLaunchd) scenario.manager (id=3) at event #1, t=0: Model error: TraCI server "SUMO 0.25.0" reports API version 10. This server is unsupported..


TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?

Simulation terminated with exit code: 133
Working directory: /home/milena/Desktop/D2DTools/omnetpp-4.6/samples/inet/examples/traci_launchd
Command line: opp_run -r 0 -n ..:../../src -l ../../src/inet omnetpp.ini

Environment variables:
PATH=/home/milena/Desktop/D2DTools/omnetpp-4.6/bin::/home/milena/bin:/home/milena/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
LD_LIBRARY_PATH=/home/milena/Desktop/D2DTools/omnetpp-4.6/lib::/home/milena/Desktop/D2DTools/omnetpp-4.6/samples/inet/src:
OMNETPP_IMAGE_PATH=/home/milena/Desktop/D2DTools/omnetpp-4.6/images


Could you tell me which version of Sumo I should use in order to perform simulations with both those versions of Veins and Inet?
If it is not possible please suggest me the correct version of sumo for Inet v2.3 and consequently a suitable Veins one.
I need to let all these tools run jointly, possibly.
thank u in advance
BR

Imen_

unread,
Jul 27, 2017, 7:12:19 PM7/27/17
to OMNeT++ Users
hi friends !!

I'm using the veins example and I want to calculate and record the throughput and the end to end delay
but I don't know where and how should I add/modify the veins code (I'm a beginner)
so can anyone please guides/gives me some advices or if someone knows where I can find the help please tell me
thank you
all the best
Imen

mouradb...@gmail.com

unread,
Mar 7, 2018, 12:40:20 PM3/7/18
to OMNeT++ Users
hi sir Christoph sommer and all  the member of the group
 I would like to manufacture my project using Omnet++
 but I have a problem how can i create mobility nodes ,and [2] how can i implement
 the simulations between cars and [3] How can I implement
my own application in scenario V2V .

Reply all
Reply to author
Forward
0 new messages