As it looks like you discovered, a Singleton is type of class that can only allow one instance to be created for the duration of the program. Once it is created, you can access it by calling the static method GetSingleton() or GetSingletonPtr() on the specific Singleton. World::Manager::GetSingleton() is commonly used, for example.
We suggest using Debug Renderables instead of Line renderables for this task - they allow for thinner lines than line renderables and that's how ANVEL's built-in GPS shows the satellite constellation.
Here’s a basic summary of how we accomplish something pretty similar internally. Note that we use the debug renderable instead of the line renderable, as it allows more customization and thinner lines, plus it is structured for rapid updates. Make sure the Debug visibility checkbox is enabled to see the results:
//Create a vector of Vector3s that represent start/end pairs for each ray.
//Create a vector of colors that represent the color of each debug line.
for( auto& ray : rays )
//For each display ray, add an entry for the start and end
debugLines.push_back( ray.End );
//For each display ray, record the color of the start and end points (usually the same color)
//but, you can have blocked rays report as a different color than successful rays, etc)
colors.push_back( Color.Red );
colors.push_back( Color.Red );
//Update the position of the renderable to match the actual position of the sensor
//If the ray coordinates for the debugLines are in World Space, then the renderable should be located at 0,0,0. Otherwise, it should
//track the position of the GPS sensor’s world object.
Rendering::RendererManager::GetSingleton().UpdateDebugRenderable( m_debugRenderable, truePosition, Quaternion::Identity() );
//Update our renderable to use those lines.
Rendering::RendererManager::GetSingleton().AddDebugLines( m_debugRenderable, debugLines, colors );
Did you invoke the commands with sudo? The resulting *.so files in 2.0 are set up to go to /usr/ANVEL directory, which needs elevated permissions for writing. Did the compilation process generate any errors or warnings?
This function does not seem to exist in ANVEL 2.5, i.e. when I try to invoke it from the built-in Python console, I get an error message saying AttributeError: 'module' object has no attribute 'GetObjectIdFromAssetId'. Other Anvel.Assets functions are there.
Would it be possible to get a bit of explanation, with regard to the parameters associated with the servo forceCurve.
Specifically, what effects the dampening, h, m, maxRate, and torque have on the performance?
Trying to tune the small robot arms, to stop the robots from flying away when the gripper contacts the ground.
Assuming you're asking about the LeverArmServo (http://wiki.anvelsim.com/2/index.php/ANVELProperties#Servo#LeverArmServo), we actually haven't used this servo type in any of the arms that we've modelled recently - we tend to stick with linear and angular servos, which may be more robust. I can send you the code snippet that explains the LeverArmServo if you'd like - however if you goal is to increase stability of the arm system, it might be better to adjust the ODE contact correction factors, or disable ground collisions entirely (unless that's an important effect for your simulation).
There are a number of surface parameters on the above page that do not have descriptions, and I suspect that these might have to do with deformable terrain.
I would assume that a pressure from the vehicle's contact area and weight is calculated, and compared against an elastic modulus for the surface type to determine deformation. Any correction or pointers on how to work with ANVEL's dynamic terrain deformation would be appreciated!
Thanks for your interest in the deformable terrain system! As you probably deduced, this system is still "experimental" - we hope to focus on completing the documentation and providing some examples after our 3.0 release next month. In the meantime, could you provide some more information on what type of surface you are trying to create and what kind of data you have available? That might help us steer you in the right direction.
I would like to simulate the Velodyne VPL-32C LIDAR but it's vertical laser distribution is non-linear. Is there currently any support for this? If not, is it possible to modify the LIDAR sensor model to support this?
Thanks for writing in! To implement this sensor, we'd recommend writing a plugin, which would be able to simulate any beam configuration that you require. Quantum Signal has worked on a VLP-16 plugin and we also intend to develop at VLP-32, so it may be a good opportunity to collaborate. Feel free to reach out to firstname.lastname@example.org to discuss options.
I am trying to use the Heightmap tool in Sim -> Environment. Where does this tool export the heightmap files to when they are created? I am using both Windows and Linux versions of ANVEL. Also, is there a way to use this program on an ogre mesh or object without creating an environment? This would save for my application of automatically creating environment terrain from LIDAR scans.
Thanks for writing in - we're happy to help. For the export heightmap menu option, a dialog will allow you to specify the location for the .obj to be created.
This issue can addressed through the GUI by going into your vehicle's motor components, as shown below.
Inside of the transfer case component(which controls the power to the front and rear axles), if you click on the drop down for OutputMode, you will see None, First Only, Second Only, and the default Both. Depending on your transfer case definition in your vehicle definition file, "First Only" and "Second Only" refers to output1 and output2 respectively in the below XML snippet.
So in this case, First Only would be RWD, Second Only would be FWD and Both would be AWD.
Since this is a changeable property in the properties menu, you can also manipulate these values through the External API at run time.
What that might look like using Python through the External API:
transferCase = anvel.GetObjectDescriptorByTypeAndName("TorqueSplitter", "transferCase")
anvel.SetProperty(transferCase.id, "OutputMode", "2") # 2 is the index in the list which corresponds to Second Only