A collection of library modules to facilitate the creation of full control loop algorithms, including state representation, motion planning, kinematics, dynamics and control.
Soo, funny thing that I came across when I saw a script that dd something along the following:
x, xd, xdd = generate_minimum_jerk(start.get_position(), goal.get_position())
# x is a list of a list
state = sr,CartesianState("test")
state.set_position(x[i]) # but wait, x[i] has a loooot of elements, why does it not fail???
state.set_linear_velocity(xd[i]) # that fails
So somehow, the positions are set with the first 3 elements of x[i] and the rest is appended in an array.
All that to say we need to check for the size of the vector/list if we set state variables in the CartesianState. In cpp it would give an Eigen runtime error, but we wanna catch that ourselves.
Soo, funny thing that I came across when I saw a script that dd something along the following:
Printing the state after setting positions:
So somehow, the positions are set with the first 3 elements of x[i] and the rest is appended in an
array
.All that to say we need to check for the size of the vector/list if we set state variables in the CartesianState. In cpp it would give an Eigen runtime error, but we wanna catch that ourselves.