I want to be able to click an activation group, the vehicle should start to move hit a certain speed (3/ms) not go above or below that speed. Also is there some kind of manual for vizzy?

Tags
Vizzy

14 Comments

  • Log in to leave a comment
  • Profile image
    10.9k Insanity

    @LofiTurtle i dont think you can just get the heading to the target, but you could subtract the craft position from the target position and then get the angle between that and the north pointing vector. You would have to figure out if the target is to the west or the east though.

    4.4 years ago
  • Profile image
    1,467 RikHar

    @Shmexysmpilot Thanks for the tips. reading your response I now realize I was looking at it totally backwards. lol. thanks. I'll keep you posted if I figure it out.

    4.4 years ago
  • Profile image
    2,966 LofiTurtle

    @RikHar if you're still learning vizzy, don't worry about PID controllers and stuff yet. To steer towards a target, you'll need to get two values. Your current heading, and the heading towards your target. The current heading is easy, just a nav block set to heading. For the target, there should be some "direction to target" vector, and you can use one of the components to get the heading to target. There might be an easier way, but I'd need to look to be sure. Once you get these two values, subtract the heading to target from your current heading, and set that value to the input you're using to steer. You probably need to multiply/divide it to make it go from -1 to 1, but that's the gist of how I'd approach it. Just have all of that running inside a loop, so it keeps recalculation the headings and steering angle

    4.4 years ago
  • Profile image
    1,467 RikHar

    @Shmexysmpilot I'm not very good with Vizzy yet. Starting to familiarize myself with it lately. Not at at familiar with a the PID controller thing. I tried to make it turn towards a target with no luck using nav-heading, yaw axis, target position, input roll, input yaw, and some others all with no luck. any ideas?

    4.4 years ago
  • Profile image
    2,966 LofiTurtle

    @RikHar you could do something similar to the throttle solution. If it's to the left of target, steer right and vice versa. A PID controller for that wouldn't be too complicated if you wanted it to function a little better

    4.4 years ago
  • Profile image
    1,467 RikHar

    @Insanity Any ideas on how to make a rover auto steer to a target? Been trying that for a a couple days now?

    4.4 years ago
  • Profile image
    10.9k Insanity

    Or you could make a full on PID controller, but thats probably a bit overkill for something simple like throttle control, if you want it to steer on its own that might be needed though.

    4.4 years ago
  • Profile image
    1,467 RikHar

    @plane918273645 Thanks. Adjusted. works great.

    4.4 years ago
  • Profile image

    You may want to make it a little more complicated than what you have because that will make the throttle flicker, if instead increase throttle 0.01 if under 3m/s and decrease by 0.01 if over 3m/s then it will be much more stable

    4.4 years ago
  • Profile image
    3,718 QarabinaKa

    @RikHar
    It's no problem. Glad to see that it works for you

    4.4 years ago
  • Profile image
    1,467 RikHar

    @QarabinaKa Thanks a lot . worked fantastic. Cant believe I struggled for two days with some this simple. Your the best.

    +1 4.4 years ago
  • Profile image
    1,467 RikHar

    Thank you so much Qarabinaka, that worked perfectly. Now I can add some extra features. Cool. Thanks.

    4.4 years ago
  • Profile image
    3,718 QarabinaKa

    The "If" and "else if" blocks are inside the "while block", but not each other. Hope this works for you!

    4.4 years ago
  • Profile image
    3,718 QarabinaKa

    Try this:
    On Start
    While [true]
    If [3 > velocity surface] and [Activation Group 1 = 1]
    Set throttle to 1
    Else if [velocity surface > 3] and [Activation Group 1 = 1]
    Set throttle to 0

    4.4 years ago

No Upvotes

Log in in to upvote this post.