Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose trajectory gridpoint times (m_ts) in parametrizers #187

Open
stevegolton opened this issue Nov 9, 2021 · 0 comments
Open

Expose trajectory gridpoint times (m_ts) in parametrizers #187

stevegolton opened this issue Nov 9, 2021 · 0 comments

Comments

@stevegolton
Copy link
Contributor

stevegolton commented Nov 9, 2021

It would be useful to have visibility on how points in the source path are remapped into the retimed path, for the purpose of path debugging.

For example, let's say you have a robot path comprised of several key waypoints. The path is retimed using toppra and sent to the robot. Assuming we can get the elapsed time from the robot while it is running the retimed path, this time could be used to work out which key waypoint in the source path the robot is currently executing for the purposes of debugging and tweaking the source path.

This information is available in both the ConstAccel and the Spline parametrizers internally as m_ts member variable but don't expose them publicly.

Describe the solution you'd like
A way to access m_ts, preferably in the toppra::Parametrizer interface, so we don't have to worry about which parametrizer is used.

Describe alternatives you've considered
We could have a separate class which works out these times and exposes them, but this mapping presumably depends on the parametrizer used.

Additional context

Suggested solution:

parametrizer.hpp

class Parametrizer : public GeometricPath {
  public:
    const Vector &times() const = 0;
};

const_accel.hpp

const Vector &times() const override;

const_accel.cpp

const Vector &ConstAccel::times() const {
  return m_ts;
}

... and the same for Spline parametrizer.

@jmirabel jmirabel mentioned this issue Mar 10, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant