Run inet example with osg with Cmdenv

308 views
Skip to first unread message

ROCHETTE Andy

unread,
May 30, 2018, 6:53:10 PM5/30/18
to OMNeT++ Users

Hello,

I'm trying to run the earth example (inet/examples/visualization/earth), im facing an error :
<!> Error: Count not find map node in the scene -- in module (inet::OsgGeographicCoordinateSystem) EarthVisualizationExample.coordinateSystem (id=3), during network initialization

this error come from :

void OsgGeographicCoordinateSystem::initialize(int stage)
{
   
if (stage == INITSTAGE_LOCAL) {
       
auto mapScene = getParentModule()->getOsgCanvas()->getScene();
        mapNode
= osgEarth::MapNode::findMapNode(mapScene);
       
if (mapNode == nullptr)
           
throw cRuntimeError("Count not find map node in the scene");

when i run the simulation in omnetpp, the console give me this commande line :

../../../../../bin/opp_run.exe -m -n ../../../src;../..;../../../tutorials;../../../showcases --image-path=../../../images -l ../../../src/INET omnetpp.ini

So i added the -u Cmdenv and replace the ';' by ':' to seperate paths :

../../../../../bin/opp_run.exe -u Cmdenv -m -n ../../../src:../..:../../../tutorials:../../../showcases --image-path=../../../images -l ../../../src/INET omnetpp.ini

Maybe it comes from the function, "findMapNode" a missing library in the command ? or it is not possible to run a simulation with osg in the Cmdenv ?

any idea please ?

Levente Mészáros

unread,
May 31, 2018, 5:31:17 AM5/31/18
to omn...@googlegroups.com
All examples should work from the command line too. I just tested this example on linux using INET 3.99.3:

levy@valarmorghulis:~/workspace/inet/showcases/visualizer/earth$ inet -p
/home/levy/workspace/omnetpp/bin/opp_run_dbg -l /home/levy/workspace/inet/bin/../src/../src/INET -n /home/levy/workspace/inet/src:/home/levy/workspace/inet/tutorials:/home/levy/workspace/inet/showcases:/home/levy/workspace/inet/examples --image-path=/home/levy/workspace/inet/images

this command was printed by 'inet -p' but I could successfully start the simulation by:

levy@valarmorghulis:~/workspace/inet/showcases/visualizer/earth$ inet

Regards,
levy


--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

jutilis...@gmail.com

unread,
May 31, 2018, 6:21:48 AM5/31/18
to OMNeT++ Users
Hi,

I downloaded inet 3.99.3 and try to run :

/omnetpp-5.3/samples/inet/examples/visualization/earth$ ../../../../../bin/opp_run.exe -m -n ../../../src:../../../examples:../..:../../../tutorials/:../../../src/inet --image-path=../../../images -l ../../../src/INET omnetpp.ini

and try:

/omnetpp-5.3/samples/inet/examples/visualization/earth$ inet -p ../../../../../bin/opp_run_dbg.exe -l ../../../src/INET -n ../../../src:../../../examples:../../../tutorials:../..:../../../tutorials/:../../../src/inet --image-path=../../../images

It works and open the application. If I had -u Cmdenv I have this error :

Setting up Cmdenv...

Loading NED files from ..\..\..\src:  668
Loading NED files from ..\..\..\examples:  175
Loading NED files from ..\..\..\tutorials:  19
Loading NED files from ..\..:  175
Loading NED files from ..\..\..\tutorials\:  19
Loading NED files from ..\..\..\src\inet:  668

Preparing for running configuration General, run #0...
Assigned runID=General-0-20180531-12:11:11-9868

<!> Error: Network '' or 'inet.examples.visualization.earth.' not found, check .ini and .ned files

I would to run the simulation without open the window. Could you try to add the "-u Cmdenv" please and tell me what you have ?

Thank you.

Levente Mészáros

unread,
May 31, 2018, 7:09:48 AM5/31/18
to omn...@googlegroups.com
Since there's no General section specifying the network in that example, you should specify the config with '-c NetworkNodes' for example. Unfortunately, it seems that the simulations don't work with Cmdenv. The reason is that the map is not loaded, because visualizers are not used in Cmdenv, but the map is needed for the geographic coordinate system. You should send a bug report using the INET github page and use Qtenv express mode until it gets fixed.

Regards,
levy
Reply all
Reply to author
Forward
0 new messages