ethz-adrl / towr

A light-weight, Eigen-based C++ library for trajectory optimization for legged robots.
http://wiki.ros.org/towr
BSD 3-Clause "New" or "Revised" License
933 stars 234 forks source link

How to specify number of steps per leg #58

Closed mwchadwick1 closed 5 years ago

mwchadwick1 commented 5 years ago

Hello, I am generating motion for some quadrupeds and when I launch towr_ros the motion always consists of 4 steps and so is infeasible for long distance motions. I believe the step count comes from the size of ee_phasedurations but I`m not sure how/where I should be specifying this size.

awinkler commented 5 years ago

Yes. For convenience, the gait generator class fills these phase durations and allows looping though gaits using the "g" key. To add additional steps, e.g. robot=Hyq, Gait=0 in interface, add another Walk2 Stride here:

https://github.com/ethz-adrl/towr/blob/d30c4a06a86e8378ce5dea813071d0ef6d04070b/towr/src/quadruped_gait_generator.cc#L80