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

Boids io_altitude_idx_ parameter set incorrectly #273

Open
crebhuhn opened this issue Mar 12, 2019 · 1 comment
Open

Boids io_altitude_idx_ parameter set incorrectly #273

crebhuhn opened this issue Mar 12, 2019 · 1 comment

Comments

@crebhuhn
Copy link

crebhuhn commented Mar 12, 2019

Objective: Continue to use Boids autonomy with no neighbors (goal seeking only)

Problem: in Boids.cpp, line 261:
vars_.output(io_altitude_idx_, v(2));

This sets 'altitude' to a value that is indexed to speed. This will cause a diving behavior if present altitude is >1. This is unexpected behavior and inconsistent with the other control modalities. Three possible fixes:

  1. remove the option to provide Boids control using desired altitude (it's velocity-based originally I believe)
  2. set the desired altitude by position + some scaled velocity:
    vars_.output(io_altitude_idx_, state_->pos().z() + v(2)*zscale);
  3. set the altitude based on the goal position
    vars_.output(io_altitude_idx_, goal_(2));

Commit: 3b1b119

Recreated by using Boids autonomy with heading/speed/alt controller.

@SyllogismRXS
Copy link
Contributor

I think option 2 is probably the most intuitive. I tested something similar and pushed it the boids-alt branch. (https://github.com/gtri/scrimmage/tree/boids-alt). Try out that branch let me know if it works for you. I had to update the predator_prey_boids.xml mission file as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants