Merge pull request #5 from tdenewiler/fix-twist-init

Fixing initialization of linear velocity output commands in simple ca…
master
Christoph Rösmann 2020-03-05 09:23:46 +01:00 committed by GitHub
commit 8a7d14049f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ class SimpleCarModel : public BaseRobotSE2
{ {
assert(u.size() == getInputDimension()); assert(u.size() == getInputDimension());
twist.linear.x = u[0]; twist.linear.x = u[0];
twist.linear.y = twist.linear.y = 0; twist.linear.y = twist.linear.z = 0;
twist.angular.z = u[1]; // warning, this is the angle and not the angular vel twist.angular.z = u[1]; // warning, this is the angle and not the angular vel
twist.angular.x = twist.angular.y = 0; twist.angular.x = twist.angular.y = 0;

View File

@ -72,7 +72,7 @@ class UnicycleModel : public BaseRobotSE2
{ {
assert(u.size() == getInputDimension()); assert(u.size() == getInputDimension());
twist.linear.x = u[0]; twist.linear.x = u[0];
twist.linear.y = twist.linear.y = 0; twist.linear.y = twist.linear.z = 0;
twist.angular.z = u[1]; twist.angular.z = u[1];
twist.angular.x = twist.angular.y = 0; twist.angular.x = twist.angular.y = 0;