Comments (5)
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.
@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.
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.
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.
@pranavgo is this addressed? If so feel free to close the issue
from gennav.
Related Issues (20)
- Add wavefront planner
- Add RRT*-Smart Path Planning HOT 1
- Add RT-RRT* Path Planning
- Add LBT-RRT Path Planning
- Add nearest_obstacle_distance method to scan environment
- Implement a method to convert Laser Scan data into an Occupancy grid
- Add Occupancy Grid Environment
- Adding odometry simulator
- Add bi-directional RRT HOT 2
- Improve docs HOT 1
- Fix bug in RRT
- Add tests for envs
- Updated RRT and PRM to use new node class HOT 1
- Make samplers a callable class
- Create djikstra function
- Add **kwargs to to planner __init__s
- Adding replan to all the planners
- Refactor RRT Based planners to use single base and reduce redundancy
- Add Hybrid RRT
- Add benchmarks in the documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gennav.