Upload
iky77
View
220
Download
0
Embed Size (px)
Citation preview
8/13/2019 Readme ANN
1/5
1 Simulation OverviewSimulation serves a very important role in robotics development. The following list describes a few of the
tasks simulation allows you to perform:
Analysis of kinematics and dynamics of robotic manipulators
Offline programming
Design of different control algorithms
Design of the mechanical structure of robots
Design of robotic cells and production lines
Given these use cases, the LabVIEW Robotics team is providing some simulator examples for robotics
users. In these examples, you can see how to control a simulated NI Robotics Starter Kit robot and a
simulatediRobot.
1.1 Accessing the LabVIEW Robotics Module HelpIn LabVIEW, select HelpSearch the LabVIEW Helpand refer to the Robotics ModuleSimulating Mobile
Robotstopic on the Contents tab of the LabVIEW Helpfor more information about designing and
controlling simulated robots.
Note: In LabVIEW, select HelpFind Examplesto launch the NI Example Finder, which you can
use to browse or search for example VIs.
1.2 Robotics Starter Kit RobotA Starter Kit robot is a fully-assembled robot base with an ultrasonic sensor, encoders, motors, a battery,
and an NI Single-Board RIO (sbRIO) that runs LabVIEW and the LabVIEW Real-Time Module and LabVIEW
FPGA Module software. Refer to the Robotics ModuleLabVIEW Robotics Starter Kittopic on the
Contents tab of the LabVIEW Helpfor more information about the Robotics Starter Kit.
2 Artificial Neural Network (ANN) Simulation ExampleThis example demonstrates how to design and validate control algorithms using the robotics simulator in
the LabVIEW Robotics Module. The example demonstrates trajectory tracking by applying an artificial
neural network (ANN) control algorithm to the simulated NI Starter Kit 1.0.
http://www.irobot.com/http://www.irobot.com/http://www.irobot.com/http://www.irobot.com/8/13/2019 Readme ANN
2/5
Figure 2.1. Trajectory tracking control
Figure 2.1 shows the control diagram, where P_ref is the reference or desired posture (x, y,
orientation) and Pis the current posture of the robot. The velocity controller outputs the required
linear and angular velocity (v, w) according to the difference between P_ref and P. Then through the
inverse-kinematic model, (v, w) is converted to velocities (v_l, v_r) of the robots left and right wheels.
Finally, (v_l, v_r) are inputs to the simulator which applies the velocities to the DaNI robot.
In this example, the velocity controller uses a classical tracking algorithm to control the robot so the
robot can get to the reference posture smoothly. This example also provides the following two inverse
kinematic models.
Analytical function model
Artificial neural network (ANN) model
This demo shows that the ANN model performs as good as or better than the analytical model.
2.1 Example FilesAfter installing the Artificial Neural Network (ANN) Simulation example, open the example. The
Ar t i f i ci al Neur al Net wor k. l vpr oj appears as shown in the following screenshot.
8/13/2019 Readme ANN
3/5
The ANN on Si mul at ed St art er Ki t 1. 0. vi is the main VI of this project. The following
screenshot shows the Front Panel of this VI.
When the simulation starts, the robot follows the path predefined by the red points:
8/13/2019 Readme ANN
4/5
2.2 Supplementary VIsThe simulator example contains a few important VIs, which are described in the following sections.
2.2.1 Utility_GenerateTrajectory.vi
This VI interpolates between positions in a path made upof (x, y) positions.
methodspecifies the interpolation method. By default, this example usescubi c Her mi t emethod.
pathspecifies an array of positions (x, y).
ntimesspecifies the interpolation locations between every (x,y) element. Interpolation between
elements repeats ntimes.
trajectoryreturns an array of (x, y, O, ds) values resulting from interpolation, where Ois the desired
orientation at position (x, y), and dsis the distance from the previous point to the current point.
2.2.2 ANN_VirtualVehiclePosture.vi
This VI returns the reference postures (x, y, O) required to travel trajectory. You can view the execution
of this VI as representing a virtual vehicle travelling thetrajectoryat a velocity of linear velocity.
trajectory is array of (x, y, O, ds), where Ois the desired orientation at position (x, y), and dsis the
distance from the last point to current point.
linear velocity specifies the desired linear velocity of the virtual vehicle.
dtspecifies the time interval at which to calculate the posture.
virtual posturereturns the posture (x, y, O) of the virtual vehicle.
velocity specifies the real linear velocity of the virtual vehicle.
angularvelocityspecifies the real angular velocity of the virtual vehicle.
2.2.3 ANN_GetPosture.vi
8/13/2019 Readme ANN
5/5
This VI returns the current posture information (x, y, O) of the DaNI robot from the simulator. In real-
world applications, you can acquire posture information from sensors.
position specifies the three dimensions (x, y, z) of the DaNI robots position.
quaternion specifies the quaternion of the DaNI robot.
vehicle status specifies the posture (x, y, O). The position input specifies the position (x, y) and the
quaternioninput specifies the orientation O.
2.2.4 ANN_4WheeledController.vi
This VI returns the linear velocities of the left and right wheels.
ESN trained specifies the input weight, feedback weight, internal weight, and output weight.
model type specifies which inverse kinematic model to use. You can specify the anal yt i cal
ki nemat i c model or ANN ki nemat i c model options.
current posture specifies the current posture (x, y, O), of the DaNI robot, where Ois the orientation.
desired posturespecifies the reference posture (x, y, O), of the DaNI robot, where Ois the orientation.
vref (nan) specifies the reference linear velocity. If this input is not wired, the default value isNaN, which
means there is no input of reference linear velocity, and the reference linear velocity will be derived
from desired posture.
wref (nan) specifies the reference angular velocity. If this input is not wired, the default value isNaN,
which means there is no input of reference angular velocity, and the reference angular velocity will be
derived from desired posture.
dt specifies the time interval.
wl returns thelinear velocity of the left wheels.
wr returns thelinear velocity of the right wheels.