NetSimulyzer icon indicating copy to clipboard operation
NetSimulyzer copied to clipboard

Issue with "decoration"

Open igs3000 opened this issue 3 years ago • 0 comments

The Netsimulyzer documentation shows the following way to use the "decoration" feature

auto decoration = CreateObjectnetsimulyzer::Decoration(/* the orchestrator */); decoration.SetAttribute ("Model", StringValue ("path/model.obj")); decoration.SetAttribute ("Height", DoubleValue (2.0));

But if we try to set a 3D object as decoration it ends with following error:,

error: ‘class ns3::Ptrns3::netsimulyzer::Decoration’ has no member named ‘SetAttribute’ decoration.SetAttribute ("Model", StringValue("mymodel.obj"));

Then I managed to run it by using decoration-> reference operator as follows :

auto decoration = CreateObjectnetsimulyzer::Decoration(orchestrator); decoration->SetAttribute ("Model", StringValue("mount.blend1.obj")); decoration->SetPosition ({0.0,0.0,0.0}); //decoration->SetAttribute ("Height", DoubleValue (0)); decoration->SetAttribute ("Scale" , DoubleValue (100));

Now if I comment the “Height” attribute setting line, then it works and opened the model in the visualizer. But if I uncomment the line “Height” attribute setting line, then the compiler ends with following error: (In fact, as document says, I am trying to change height before changing the scale.

Build failed -> task in 'mytestsimulation failed with exit status 1 (run with -v to display more information)

Why the 'decoration.SetAttribute. is not working? (dot) Why adjusting height of the decorative 3D model is not working?.

Charles Pandian

igs3000 avatar Oct 18 '21 15:10 igs3000