-
Notifications
You must be signed in to change notification settings - Fork 31
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
TrajectoryTask usage #26
Comments
We typically use a lot of HighLevelTasks: in our framework, we currently have helpers for:
There are few more things that can be used, but those should be a good start. For Tasks, the only thing that's deprecated is
In your example, if you want to follow a 6D trajectory, yes, you should create one per objective. I'll write here a small example (might not compile): // Load all your data here
// Either something like
// std::vector<Eigen::Vector3d> positions = loadFromFile()
// or
// Generator positions = trajectory.generate()...
// I'll assume the latter for this example.
tasks::qp::PositionTask posTask(mbs, robotIndex, "EF", Eigen::Vector3d(0, 0, 0));
tasks::qp::OrientationTask oriTask(mbs, robotIndex, "EF", Eigen::Matrix3d::Identity());
tasks::qp::TrajectoryTask posTrajTask(mbs, robotIndex, &posTask, 100, 20, 100);
tasks::qp::TrajectoryTask oriTrajTask(mbs, robotIndex, &oriTask, 100, 20, 100);
solver.addTask(posTrajTask);
solver.addTask(oriTrajTask);
for(std::size_t i = 0; i < positions.size(); ++i)
{
posTask.position(positions.next());
posTrajTask.refVel(linearSpeeds.next());
oriTask.orientation(orientations.next());
oriTrajTask.refVel(rotationSpeeds.next());
solver.solve();
} |
Suggestion: copy-paste this into the project wiki. (Time cost is almost zero, and docs always help.) Edit: I actually went forward with a tentative page. Feel free to edit, or remove if you disagree. |
@haudren thanks I'll give that a shot it isn't too different from before. @stephane-caron good idea |
Thank you Stéphane and @ahundt don't hesitate if you have more questions. Note that I did not cover it here, but you can also supply a reference acceleration. |
@ahundt : Did you manage to do what you wanted? If yes, I will close this issue :) |
I had hit the end of my last semester so I got sidetracked. I'll be coming back to it soon. |
I need to:
Would any of the existing tasks be suitable for that? Can Might have been a bit longer delay than I imagined before coming back to this! Had to get some low level stuff working, and now I'm seeing trouble where tasks isn't taking a straight line to goals I set in real time. Tuning the weights helped but isn't sufficient. Right now I'm primarily using a position task and an orientation task, but I'm not sure if there is a way to lock it on to a Cartesian straight line path to the goals with a locked orientation as well. |
What HighLevelTasks would you feed to a TrajectoryTask?
Also should separate ones be created for position, velocity, and orientation control?
Is there any chance a small example could be created like for the other tasks/unit tests?
Also, which Tasks in QPTasks.h are deprecated/unused again?
The text was updated successfully, but these errors were encountered: