Closed disRecord closed 5 years ago
Thanks for your help on this. I incorporated your changes and did some modifications in #56 to make the parameters and gaits more accessible.
Can you explain why you did the additional changes to GaitGenerator. So I can understand why you want to change that, e.g. remove GetNormalizedPhaseDurations() etc.
Can you explain why you did the additional changes to GaitGenerator. So I can understand why you want to change that, e.g. remove GetNormalizedPhaseDurations() etc.
I didn't like how private GetGaitPhases()
return timings for all legs and then `GetNormalizedPhaseDurations()
and GetNormalizedPhaseDurations()
use only information related to one leg. So additional unnecessary computations and memory allocation is happen every GetPhaseDurations()
call.
GetNormalizedPhaseDurations()
is unnecessary, you can simply call GetPhaseDurations(1.0, ee)
.
On other hand GetUnscaledDurations()
and GetUnscaledTotalDuration()
can be useful. Unscaled duration of one elemental step sequence which corresponds to Gaits
element (Walk1
, Run1
and etc) is usually equal to one. So total unscaled duration is roughly equal to number of steps and it measures complexity of movement.
In my code I wanted to scale dt_constraint_range_of_motion_
, duration_base_polynomial_
and other dt_*
parameters to number of steps. So the duration of movement would not influence significantly on optimization problem complexity.
In current version of towr_app
if you set movement duration to 5 or 6 seconds optimization problem becomes more complex. Moreover end effector polynomials can became over-constrained because there is fixed number such polynomials to each step.
Okey, that makes sense, thanks for clarifying. To keep this clean, it would be great if you could open a new PR with just the changes to GaitGenerator based off of the updated master (i'll close this one then). The SetGaits method is already public, so the new PR focusses only on my above question. And please make sure towr_ros_app.cc is using the updated method in the same way.
Thanks! :)
Ок. I'll do it a little later after I finish towr
based gait generator for our project. (Well, mainly finish). I am not planning to change either dt_*
parameters or GetPhaseDurations()
. So towr_app
should work as intended.
Also I noticed other inconvenience in towr
library API (for example, it is imposible to set end effectors' positions and velocity at the end of trajectory). I'll suggest PR on it latter.
This pull request addresses issue #54.
Parameters
class is made public. Unnecessary access methods are removed.GaitGenerator::SetGaits()
is made public.std::pair
to represent bounds instead ofarray<2>
, optimized GetPhase Durations().