To download NI software, including the products shown below, visit ni.com/downloads.
Summary
This example will programmatically get a reference to the first obstacle in the Manifest file and modify one of its properties during execution, as well as modify a simulation property.
Overview
The Robotics Module saves information regarding the simulation scene in a Manifest file. This file contains references to the robots and obstacles that will populate this scene.
The easiest way to create a manifest file is to use the wizard; while permanent modifications to the simulation file may be done via the Offline Execution Vis, we can take the approach in this example to temporarily change an object’s property such as a position.
In order to do so, this example will load up the reference to a manifest file and access the simulator engine via a property node. The Obstacles are picked and indexed in order to access the first one; should the manifest file have more than one obstacle, you must simply switch the input to the Index Array. A property node gets the ID for the obstacle as a string which is then passed to the Get Obstacle Reference polymorphic VI. You may alternatively wire the string directly if the ID of the obstacle is known.
In what concerns changing the world’s properties, the matter is similar. A reference to the world is passed from the Simulator Engine property node, and modified with a different property node.
Steps to Implement or Execute Code
VI Snippet
Requirements
Software
LabVIEW 2012 with the Robotics Module.
Additional Images
Front Panel
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.