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

Next revision
Previous revision
eeros_architecture:control_system:available_blocks:pathplannercubic [2017/12/12 12:09] – created 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+//time          //jerk          //acceleration  //velocity      //position
 8.0000000e-02   0.0000000e+00   0.0000000e+00   0.0000000e+00   0.0000000e+00 8.0000000e-02   0.0000000e+00   0.0000000e+00   0.0000000e+00   0.0000000e+00
 2.4000000e-01   1.0000000e+04   0.0000000e+00   0.0000000e+00   0.0000000e+00 2.4000000e-01   1.0000000e+04   0.0000000e+00   0.0000000e+00   0.0000000e+00
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 accelerationvelocity and position must be set to the values they reached at the end of interval two in order not to cause any discontinuitiesYou have to calculate these values with an external tool. 
-A socket data block can have zero or one input. The first template parameter indicates the type of the input signal while the second parameter denotes the type of the output signale.g.:+[{{ :eeros_architecture:control_system:available_blocks:pathplannercubic.png?600 |Path planner output for a given path}}] 
 + 
 +The trajectory file is loaded with 
 <code cpp> <code cpp>
-SocketData<Vector3, int> socket1;+  init(filename);
 </code> </code>
-This blocks will have a signal input (a signal from another control system block) of type ''Vector3'' and send this signal over the socket connection. Concurrently the block will receive single values of type ''int'' and write these values onto its output signal, where it can be consumed by other blocks. If the socket data blocks has only data to transmit but no data to receive use ''std::nullptr_ptr'' as template parameter.+where ''filename'' denotes a file containing the new trajectory 
 +\\ 
 +When calling
 <code cpp> <code cpp>
-SocketData<Matrix<6,1,double>, std::nullptr_t> socket2; // send Matrix<6,1,double>, receive nothing +  move(startPos);
-SocketData<Vector2, std::nullptr_t> socket3;         // send nothing, receive Vector2+
 </code> </code>
- +you dispatch new trajectory. The trajectory is taken from the path fileno scaling is made. The trajectory starts from ''startPos'' and moves the distance given in the trajectory path file within the time given in the same file
-===== Parameters ===== +\\ 
-When constructing 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.  +You can also call 
-The period of the internal thread determines the transceiver frequency.+
 <code cpp> <code cpp>
-SocketData<Matrix<10,2,double>, double> socket1(""98760.5); +  move(timestartPosdeltaPos);
 </code> </code>
-A socket server is established. Input 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'+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'' 
-<code cpp> +
-SocketData<Matrix<10,2,double>, double> socket2("146.136.36.102", 9876, 0.5);  +
-</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'+
-===== 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.1513076969.txt.gz · Last modified: 2017/12/12 12:09 (external edit)