Giter Site home page Giter Site logo

Comments (5)

SuhrudhSarathy avatar SuhrudhSarathy commented on July 2, 2024 1

As mentioned by @hardesh , a loop will be a good way to follow. However we must also keep in mind that we should be able to break the loop to carry out another trajectory also. We could do something in these lines.

current_goal_index = 0
while request_to_move:
    start = trajectory[current_goal_index]
    goal = trajectory[current_goal_index + 1]
    error, need = PID.init(start, goal)
    if need:
        repeat - > PID.goto(end, current_pose)
    if current_goal_index == len(trajectory-1) or new_trajectory_found:
        break
    elif:
        current_goal_index += 1

I think we have to figure out how to update current_pose, into the function and also incorporate new_trajectory_found function. PID.goto will be a loop again, we should have more control over how we break it.

from gennav.

threewisemonkeys-as avatar threewisemonkeys-as commented on July 2, 2024

@SuhrudhSarathy, @hardesh for this, how do you think we should proceed? Since we were thinking of passing a complete trajectory to each controller, but how would PID decide which is the current target point?

from gennav.

hardesh avatar hardesh commented on July 2, 2024

I think here you'll have to use the base PID object which has the goto method.

You can follow something like this:

for i in range(len(trajectory)-1):
  start = trjectory[i]
  end = trajectory[i+1]
  PID.init(start, end)
  repeat -> PID.goto(end, current_pose)

You'll have to figure out how to implement that repeat function without ROS.

from gennav.

hardesh avatar hardesh commented on July 2, 2024

Instead of breaking out of the loop after the controller gets a new trajectory, you can reinitialize the main controller with the new trajectory.

from gennav.

threewisemonkeys-as avatar threewisemonkeys-as commented on July 2, 2024

@pranavgo is this addressed? If so feel free to close the issue

from gennav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.