Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Front Panel Control and Indicators for Robotics (Robotics Module)

LabVIEW 2013 Robotics Module Help

Edition Date: June 2013

Part Number: 372983D-01

»View Product Info

Use the control and indicators on the Robotics palette to create front panels for your VIs. You can access the simulator display control and compass, attitude, and rangefinder indicators and use them with other controls and indicators from the Controls palette to create a user interface.

Note  LabVIEW breaks VIs under RT targets that contain one of these indicators until you remove the indicator. To continue to display data on the front panel, replace these indicators with numeric controls that display the raw numeric values.

Simulator Display Controls

The simulator display control adds additional functionality to the 3D picture control. Use the simulator display control to display the simulation scene of a robotics simulator and to configure the simulator during run time.  

During run time, you can right-click the simulator display control and edit the following appearance and behavior attributes of the simulator.

  • Background Color—Specifies the background color of the simulator. The default is black. Click the color control to display the color palette and select a color. Click OK to confirm selection.
  • Draw Mode—Displays the visual model and/or the physical model of the robot and objects in the simulation scene.
  • Draw Contacts—Displays the contact points between the robot and objects in the simulation scene.
  • Display Robot ID—Displays the robot ID.
  • Display Sensor Data—Displays the sensor data, such as the sensor field. This control only displays sensor data from Range Finder and light detection and ranging (LIDAR) devices.
  • Pause Simulator Service—Pauses the simulator service. Uncheck this menu item to resume the simulator service.
  • Reset Simulator Service—Resets the simulator service to default positions.

Refer to the Goalkeeper VI in the labview\examples\robotics\Simulator\Goalkeeper directory for an example of using the simulation display control.

Compass Indicators

The compass indicator accepts angles relative to north and displays the corresponding directions. By default, this indicator accepts angles in degrees, but you can configure the indicator to accept radians. An angle of zero degrees (zero radians) corresponds to north, and angles increase clockwise on the compass: 90 degrees ( / 2 radians) is east, 180 ( radians) is south, and 270 ( / 2 radians) is west.  

The following front panel shows the result of passing a value of 45 to a compass indicator.

This indicator wraps values less than zero degrees (zero radians) and greater than 360 degrees (2 radians). For example, values of –315, 45, and 405 all produce the result of northeast shown in the previous front panel.

You can edit the appearance and behavior of compass indicators.

Refer to the NMEA Get GPS Data From Record VI in the labview\examples\robotics\NMEA directory for an example of using the compass indicator.

Attitude Indicators

The attitude indicator displays the orientation of a body relative to the horizon given the roll and pitch of the body. Roll and pitch define the angles of the body's x- and y-axes relative to horizon, respectively. In the case of an aircraft, roll corresponds to the angle of the wings and pitch corresponds to the angle of the nose relative to the round.  

This indicator accepts a cluster of two numeric values, where the first element represents roll and the second element represents pitch. By default, this indicator accepts angles in degrees, but you can configure the indicator to accept radians. The following front panel shows the result of passing a roll value of 15 degrees and a pitch value of 15 degrees to this indicator.

This indicator wraps values less than zero degrees (zero radians) and greater than 360 degrees (2 radians). For example, setting both roll and pitch to –345, 15, or 375 all produce the result shown in the previous front panels.

You can edit the appearance and behavior of attitude indicators.

Rangefinder Indicators

The rangefinder indicator displays the locations of obstacles on a polar plot. Pass data from sensors that acquire the angles and distances to obstacles, such as LIDAR sensors, to this indicator. This indicator works with data from real or simulated sensors.  

This indicator accepts a cluster whose first element is a 1D array of angles at which the sensor took a reading. The second cluster element is a 2D array of distances at which the sensor detected obstacles, where each column index corresponds to the same index in the 1D array of angles.

The following front panel shows a simple example of how the rangefinder indicator displays the locations of obstacles. In a real application, bundle angle/direction values from a sensor with the corresponding distance/magnitude values to create input data for this indicator. Different sensor types and models return data in different formats, so you might need to manipulate the data to match the format the indicator requires.

The top-center of the rangefinder indicator corresponds to zero degrees. Positive values represent positions to the left of the center, while negative values represent positions to the right of the center. LabVIEW interprets distance values of NaN to mean no obstacle was detected at a particular angle. By default, rangefinder indicators display obstacles detected within a range of 1 unit. However, you can edit the visible range, scale, and other properties of rangefinder indicators.

Note  By default, this indicator accepts angles in degrees, but you can configure the indicator to accept radians. You can use any unit of measurement to specify distance values. However, always use consistent units when you specify these values.

Distances are expressed in a 2D array because some sensors can detect obstacles at the same angle but at multiple distances. For example, consider a translucent window backed by a solid wall. A LIDAR sensor might detect both the window and the wall if a pulse from the sensor passes through the window.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit