User Tools

Site Tools


eeros_architecture:control_system:available_blocks:pathplannercubic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eeros_architecture:control_system:available_blocks:pathplannercubic [2017/12/12 12:12] – [Path Planner Cubic] grafeeros_architecture:control_system:available_blocks:pathplannercubic [2020/09/03 08:58] (current) ursgraf
Line 1: Line 1:
 ====== Path Planner Cubic ====== ====== Path Planner Cubic ======
-path planner reads a file containing a pathThis file must contain several lines of setpoints for position, velocity, acceleration and jerk.+This path planner takes precalculated cubic splines from a file and outputs the resulting values for jerk, acceleration, velocity and position onto its outputsAll these values are given for one dimension. The file must contain piecewise information about the jerk within a given interval together with the start conditions for acceleration, velocity and position at the beginning of the interval. You must make sure, that these initial values are the results from the last intervalLet's make an example with the following four intervals:
 <code> <code>
 //time          //jerk          //acceleration  //velocity      //position //time          //jerk          //acceleration  //velocity      //position
Line 8: Line 8:
 2.4000000e-01  -1.0000000e+04   2.4000000e+03   4.8000000e+02   5.3760000e+01 2.4000000e-01  -1.0000000e+04   2.4000000e+03   4.8000000e+02   5.3760000e+01
 </code> </code>
 +The jerk within the second interval is 1e4 while the acceleration, velocity and position are all zero at the beginning of this interval. The jerk is set to zero in the third interval. The acceleration, velocity and position must be set to the values they reached at the end of interval two in order not to cause any discontinuities. You have to calculate these values with an external tool.
 +[{{ :eeros_architecture:control_system:available_blocks:pathplannercubic.png?600 |Path planner output for a given path}}]
 +
 +The trajectory file is loaded with 
 +<code cpp>
 +  init(filename);
 +</code>
 +where ''filename'' denotes a file containing the new trajectory. 
 \\ \\
-A path planner block has four output signals - jerk, acceleration, velocity, and position. +When calling
-===== Parameters ===== +
-When constructing a socket data block you can pass the ip-address, the port number, and the period of the internal thread as parameters. If you pass an empty string as ip-address, a socket server will be created. Setting the ip-address will cause a socket client to be created, which tries to connect to the given ip-address.  +
-The period of the internal thread determines the transceiver frequency.+
 <code cpp> <code cpp>
-SocketData<Matrix<10,2,double>, double> socket1("", 9876, 0.5); +  move(startPos);
 </code> </code>
-A socket server is establishedInput and output signals will be transmitted twice per second. A remote client would have to connect to the ip-address of the machine running this application on port '9876'.+you dispatch a new trajectory. The trajectory is taken from the path file, no scaling is madeThe trajectory starts from ''startPos'' and moves the distance given in the trajectory path file within the time given in the same file. 
 +\\ 
 +You can also call 
 <code cpp> <code cpp>
-SocketData<Matrix<10,2,double>, double> socket2("146.136.36.102"98760.5); +  move(timestartPosdeltaPos);
 </code> </code>
-This creates a socket client. Input and output signals will be transmitted twice per second. The client connects to a server on the ip-address '146.136.36.102with port number '9876'+This will take the trajectory from the file and scale it so that it starts at ''startPos'' and moves the distance given by ''deltaPos'' within the desired ''time'' 
-===== Miscellaneous ===== +
-As soon as a client connects to a socket server a connection is up and running until either one of them stops. It is possible to stop the server or the client and restart it subsequently. In both cases a new connection will be established. \\ +
-As long as the connection is not yet open the ''SocketData'' block will have output values being zero. As soon as the connection is broken the block will set its output values back to zero.+
eeros_architecture/control_system/available_blocks/pathplannercubic.1513077141.txt.gz · Last modified: 2017/12/12 12:12 (external edit)