ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It depends what you want. The reason for the uncontinuity is that the angles are normalized. If your controller is OK with arbitrarily growing values for angles (that with huge values might leads to loss of precision) that solution would be to "renormalize" to the last angle, i.e.:

  • Remember the last angle
  • Get current (normalized) angle
  • add/substract 2*pi until (angle - last_angle) is smallest

The better solution would probably to handle that nicely in the controller, but that depends on its functionality (e.g. if you calculate an angle difference in the controller normalize that difference).

It depends what you want. The reason for the uncontinuity is that the angles are normalized. If your controller is OK with arbitrarily growing you would use them incrementally values for angles (that might grow arbitrarily, so they are not that nice to read (and which with huge values might leads to loss of precision) that precision). One solution would be to "renormalize" to the last angle, i.e.:

  • Remember the last angle
  • Get current (normalized) angle
  • add/substract 2*pi until (angle - last_angle) is smallest

The better solution would probably to handle that nicely in the controller, but that depends on its functionality (e.g. if you calculate an angle difference in the controller normalize that difference).

It depends what you want. The reason for the uncontinuity is that the angles are normalized. If you would use them incrementally values might grow arbitrarily, so they are not that nice to read (and which with huge values might leads lead to loss of precision). One solution would be to "renormalize" to the last angle, i.e.:

  • Remember the last angle
  • Get current (normalized) angle
  • add/substract 2*pi until (angle - last_angle) is smallest

The better solution would probably to handle that nicely in the controller, but that depends on its functionality (e.g. if you calculate an angle difference in the controller normalize that difference).

It depends what you want. The reason for the uncontinuity is that the angles are normalized. If you would use them incrementally values might grow arbitrarily, so they are not that nice to read (and which with huge values might lead to loss of precision). One solution would be to "renormalize" to the last angle, i.e.:

  • Remember the last angle
  • Get current (normalized) angle
  • add/substract 2*pi until (angle - last_angle) is smallest

The better solution would probably be to handle that nicely in the controller, but that depends on its functionality (e.g. if you calculate an angle difference in the controller normalize that difference).

It depends what you want. The reason for the uncontinuity is that the angles are normalized. If you would use them incrementally values might grow arbitrarily, so they are not that nice to read (and which with huge values might lead to loss of precision). One solution would be to "renormalize" to the last angle, i.e.:

  • Remember the last angle
  • Get current (normalized) angle
  • add/substract 2*pi until (angle - last_angle) is smallest

The better solution would probably be to handle that nicely in the controller, but that depends on its functionality (e.g. if you calculate an angle difference in the controller normalize that difference).difference). The angles packages provides: shortest_angular_distance for this.