Skip to content

RRT Star Connect path planning algorithm in work and Rospy turtle wandering through that path with the help of PID. This was originally a KRSSG task and the problem statement and the output is provided in the repo.

Notifications You must be signed in to change notification settings

devxdebanjan/RRTStar-Connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯AIM

Implementing a path planning algorithm on an image of 600x600 pixels. I have used the RRT* connect algorithm for path planning in my code. Next the path is traversed using PID by turtlesim node in ROS noetic.

👨‍💻LANGUAGE

Python

💻OS

Linux (made in Ubuntu)

📚LIBRARIES USED

  • OpenCV
  • math
  • random
  • matplotlib
  • rospy

⚙️INSTRUCTIONS

  • Implementing a path planning algorithm on an image of 600x600 pixels. I have used the RRT* connect algorithm for path planning in my code. Next the path is traversed using PID by turtlesim node in ROS noetic.
  • Here there are three files: spawnturt.py, goto.py and myconnect.py. spawnturt.py spawns the turtle at the start position of the path. goto.py traverse is the whole path coordinates and moves the turtle forward through PID. myconnect.py is the actual script which contents the whole algorithmic implementation of RRT Star connect.

    Do these steps before running myconnect.py:
  • For running the ROS noetic, open your terminal and run roscore.
  • Next you can choose to kill the turtle1 because the spawned turtle will be entirely different.
  • Command to do this:
    rosservice call /kill 'turtle1'

Now run myconnect.py.

Few additional tips:

  • In lines: 13, 42 and 311, exchange the directories of the image you would want to generate a path in.
  • You can easily alter the parameters within the first five line of the code.
    • Increasing the step size decreases the time required for getting the path.
    • Increasing the search radius increases the rewiring radius of the path nodes.
    • Increasing safety leads you to a safer path where it is ensured that no obstacles are there in the way.
    • Ideal safety is half of the step parameter but that takes too much Max_iterations.
  • So suitable step size and safety is given for a smooth path generating of Image1.png.

This runs the whole algorithm and then gives you a path from start to end point. As soon as you close the OpenCV window the turtle should run and the same implication can be seen in matplotlib window. if turtle misbehaves;) try to change parameters like tolerance, or coefficient of linear/angular velocity. Suitable parameters are given for a smooth path generation of Image1.png for now.

The output paths generated and turtle running on them can be seen in the output folder of the repo.

Please leave if a follow if you found this useful.
Thank you✨

About

RRT Star Connect path planning algorithm in work and Rospy turtle wandering through that path with the help of PID. This was originally a KRSSG task and the problem statement and the output is provided in the repo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages