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

Trajectory throws an error when two waypoints are the same #1

Open
J-Durotifa opened this issue Apr 25, 2019 · 5 comments
Open

Trajectory throws an error when two waypoints are the same #1

J-Durotifa opened this issue Apr 25, 2019 · 5 comments

Comments

@J-Durotifa
Copy link

I tried the UAV-trajectory generation tool, but whenever I have two waypoints with the same values in succession (like a pause during flight) , I get the error message below. How do I generate trajectories that gives room for pauses during flight?

WARNING: Logging before InitGoogleLogging() is written to STDERR
F0425 11:04:29.853758 22964 polynomial_optimization_linear_impl.h:287] Check failed: segment_time > 0 (0 vs. 0) Segment times need to be greater than zero
*** Check failure stack trace: ***
Aborted (core dumped)

@whoenig
Copy link
Owner

whoenig commented Apr 26, 2019

I think a good workaround is to simply generate multiple trajectories - this way you can also control (in your high-level code) how long the pause should be. In the library that is used here, it is also possible to add constraints on derivatives, i.e., you could force the velocity to be zero at a certain waypoint. However, since the timing is computed automatically based on the dynamic limits of your quadrotor, this would not result in a user-configurable pause.

@NicksonYap
Copy link

Hi @whoenig

Just some feedbacks & questions here.

I have some waypoints generated from Blender, where it defines what time to be at what coordinate
image

Here's a csv of the path shown above
sequence_000.zip
It has: Timestamp (100ms interval), x,y,z (absolute) and r, g, b

Can this lib be easily extended to also meet time constraints?

@whoenig
Copy link
Owner

whoenig commented May 8, 2019

This tool is not made for this purpose. The problem you are describing is actually simpler (mathematically speaking): a trajectory is just another representation of positions (and higher order derivatives) over time. It looks like Blender already generated some smooth curve (e.g., Bezier curve?). All you would need to do is to export the curve itself and convert it the trajectory format (8th order polynomial spline) that is used for the Crazyflie. This repository here deals with the problem of finding timing information if only the waypoints are known.

@J-Durotifa
Copy link
Author

This tool is not made for this purpose. The problem you are describing is actually simpler (mathematically speaking): a trajectory is just another representation of positions (and higher order derivatives) over time. It looks like Blender already generated some smooth curve (e.g., Bezier curve?). All you would need to do is to export the curve itself and convert it the trajectory format (8th order polynomial spline) that is used for the Crazyflie. This repository here deals with the problem of finding timing information if only the waypoints are known.

Hi Whoenig,

I would like to use timestamped Cartesian coordinates to generate 8th order polynomials like NicksonYap showed in his CSV and i don't know how to do this. Is this something you can elaborate on?

@NicksonYap
Copy link

@J-Durotifa so far this is not handled by this repo, nor was it the goal for creating Trajectories

Assuming you use Crazyflie, for now we can only use Crazyflie's Timescale to speed up or slow down the whole Trajectory (a chain of polynomials)

It's equivalent to this repo's 'stretchtime' argument in:
https://github.com/whoenig/uav_trajectories/blob/master/scripts/plot_trajectory.py

For more details on possible workarounds, See:
#3

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

3 participants