text
stringlengths
24
1.04M
metadata
stringlengths
233
497
### File: ArmNavigation/arm_obstacle_navigation/arm_obstacle_navigation.py """ Obstacle navigation using A* on a toroidal grid Author: Daniel Ingram (daniel-s-ingram) """ from math import pi import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import from_levels_and_colors plt.ion() # Simulation...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/arm_obstacle_navigation/arm_obstacle_navigation.py", "license": "mit", "size": 8688}
### File: ArmNavigation/arm_obstacle_navigation/arm_obstacle_navigation_2.py """ Obstacle navigation using A* on a toroidal grid Author: Daniel Ingram (daniel-s-ingram) Tullio Facchinetti (tullio.facchinetti@unipv.it) """ from math import pi import numpy as np import matplotlib.pyplot as plt from matplotlib.co...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/arm_obstacle_navigation/arm_obstacle_navigation_2.py", "license": "mit", "size": 9814}
### File: ArmNavigation/n_joint_arm_3d/NLinkArm3d.py """ Class of n-link arm in 3D Author: Takayuki Murooka (takayuki5168) """ import numpy as np import math from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt class Link: def __init__(self, dh_params): self.dh_params_ = dh_params ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/n_joint_arm_3d/NLinkArm3d.py", "license": "mit", "size": 6950}
### File: ArmNavigation/n_joint_arm_3d/__init__.py import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent))
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/n_joint_arm_3d/__init__.py", "license": "mit", "size": 78}
### File: ArmNavigation/n_joint_arm_3d/random_forward_kinematics.py """ Forward Kinematics for an n-link arm in 3D Author: Takayuki Murooka (takayuki5168) """ import math from NLinkArm3d import NLinkArm import random def random_val(min_val, max_val): return min_val + random.random() * (max_val - min_val) def ma...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/n_joint_arm_3d/random_forward_kinematics.py", "license": "mit", "size": 1011}
### File: ArmNavigation/n_joint_arm_3d/random_inverse_kinematics.py """ Inverse Kinematics for an n-link arm in 3D Author: Takayuki Murooka (takayuki5168) """ import math from NLinkArm3d import NLinkArm import random def random_val(min_val, max_val): return min_val + random.random() * (max_val - min_val) def ma...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/n_joint_arm_3d/random_inverse_kinematics.py", "license": "mit", "size": 1233}
### File: ArmNavigation/n_joint_arm_to_point_control/NLinkArm.py """ Class for controlling and plotting an arm with an arbitrary number of links. Author: Daniel Ingram """ import numpy as np import matplotlib.pyplot as plt class NLinkArm(object): def __init__(self, link_lengths, joint_angles, goal, show_animati...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/n_joint_arm_to_point_control/NLinkArm.py", "license": "mit", "size": 2486}
### File: ArmNavigation/n_joint_arm_to_point_control/n_joint_arm_to_point_control.py """ Inverse kinematics for an n-link arm using the Jacobian inverse method Author: Daniel Ingram (daniel-s-ingram) Atsushi Sakai (@Atsushi_twi) """ import sys from pathlib import Path sys.path.append(str(Path(__file__).parent...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/n_joint_arm_to_point_control/n_joint_arm_to_point_control.py", "license": "mit", "size": 541...
### File: ArmNavigation/rrt_star_seven_joint_arm_control/rrt_star_seven_joint_arm_control.py """ RRT* path planner for a seven joint arm Author: Mahyar Abdeetedal (mahyaret) """ import math import random import numpy as np import matplotlib.pyplot as plt import sys import pathlib sys.path.append(str(pathlib.Path(__file...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/rrt_star_seven_joint_arm_control/rrt_star_seven_joint_arm_control.py", "license": "mit", "si...
### File: ArmNavigation/two_joint_arm_to_point_control/two_joint_arm_to_point_control.py """ Inverse kinematics of a two-joint arm Left-click the plot to set the goal position of the end effector Author: Daniel Ingram (daniel-s-ingram) Atsushi Sakai (@Atsushi_twi) Ref: P. I. Corke, "Robotics, Vision & Control...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "ArmNavigation/two_joint_arm_to_point_control/two_joint_arm_to_point_control.py", "license": "mit", "size":...
### File: Bipedal/bipedal_planner/bipedal_planner.py """ Bipedal Walking with modifying designated footsteps author: Takayuki Murooka (takayuki5168) """ import numpy as np import math from matplotlib import pyplot as plt import matplotlib.patches as pat from mpl_toolkits.mplot3d import Axes3D import mpl_toolkits.mplot3...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Bipedal/bipedal_planner/bipedal_planner.py", "license": "mit", "size": 8048}
### File: Control/inverted_pendulum/inverted_pendulum_lqr_control.py """ Inverted Pendulum LQR control author: Trung Kien - letrungkien.k53.hut@gmail.com """ import math import time import matplotlib.pyplot as plt import numpy as np from numpy.linalg import inv, eig # Model parameters l_bar = 2.0 # length of bar M...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Control/inverted_pendulum/inverted_pendulum_lqr_control.py", "license": "mit", "size": 4187}
### File: Control/inverted_pendulum/inverted_pendulum_mpc_control.py """ Inverted Pendulum MPC control author: Atsushi Sakai """ import math import time import cvxpy import matplotlib.pyplot as plt import numpy as np # Model parameters l_bar = 2.0 # length of bar M = 1.0 # [kg] m = 0.3 # [kg] g = 9.8 # [m/s^2] ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Control/inverted_pendulum/inverted_pendulum_mpc_control.py", "license": "mit", "size": 4322}
### File: Control/move_to_pose/move_to_pose.py """ Move to specified pose Author: Daniel Ingram (daniel-s-ingram) Atsushi Sakai (@Atsushi_twi) Seied Muhammad Yazdian (@Muhammad-Yazdian) P. I. Corke, "Robotics, Vision & Control", Springer 2017, ISBN 978-3-319-54413-7 """ import matplotlib.pyplot as ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Control/move_to_pose/move_to_pose.py", "license": "mit", "size": 5784}
### File: Control/move_to_pose/move_to_pose_robot.py """ Move to specified pose (with Robot class) Author: Daniel Ingram (daniel-s-ingram) Atsushi Sakai (@Atsushi_twi) Seied Muhammad Yazdian (@Muhammad-Yazdian) P.I. Corke, "Robotics, Vision & Control", Springer 2017, ISBN 978-3-319-54413-7 """ impo...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Control/move_to_pose/move_to_pose_robot.py", "license": "mit", "size": 7387}
### File: Localization/cubature_kalman_filter/cubature_kalman_filter.py """ Cubature Kalman filter using Constant Turn Rate and Velocity (CTRV) model Fuse sensor data from IMU and GPS to obtain accurate position https://ieeexplore.ieee.org/document/4982682 Author: Raghuram Shankar state matrix: ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Localization/cubature_kalman_filter/cubature_kalman_filter.py", "license": "mit", "size": 8236}
### File: Localization/ensemble_kalman_filter/ensemble_kalman_filter.py """ Ensemble Kalman Filter(EnKF) localization sample author: Ryohei Sasaki(rsasaki0109) Ref: Ensemble Kalman filtering (https://rmets.onlinelibrary.wiley.com/doi/10.1256/qj.05.135) """ import sys import pathlib sys.path.append(str(pathlib.Path(...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Localization/ensemble_kalman_filter/ensemble_kalman_filter.py", "license": "mit", "size": 6632}
### File: Localization/extended_kalman_filter/ekf_with_velocity_correction.py """ Extended kalman filter (EKF) localization with velocity correction sample author: Atsushi Sakai (@Atsushi_twi) modified by: Ryohei Sasaki (@rsasaki0109) """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.p...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Localization/extended_kalman_filter/ekf_with_velocity_correction.py", "license": "mit", "size": 5131}
### File: Localization/extended_kalman_filter/extended_kalman_filter.py """ Extended kalman filter (EKF) localization sample author: Atsushi Sakai (@Atsushi_twi) """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) import math import matplotlib.pyplot as plt import numpy ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Localization/extended_kalman_filter/extended_kalman_filter.py", "license": "mit", "size": 4279}
### File: Localization/histogram_filter/histogram_filter.py """ Histogram Filter 2D localization example In this simulation, x,y are unknown, yaw is known. Initial position is not needed. author: Atsushi Sakai (@Atsushi_twi) """ import copy import math import matplotlib.pyplot as plt import matplotlib as mpl im...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Localization/histogram_filter/histogram_filter.py", "license": "mit", "size": 7193}
### File: Localization/particle_filter/particle_filter.py """ Particle Filter localization sample author: Atsushi Sakai (@Atsushi_twi) """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) import math import matplotlib.pyplot as plt import numpy as np from utils.angle imp...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Localization/particle_filter/particle_filter.py", "license": "mit", "size": 6776}
### File: Localization/unscented_kalman_filter/unscented_kalman_filter.py """ Unscented kalman filter (UKF) localization sample author: Atsushi Sakai (@Atsushi_twi) """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) import math import matplotlib.pyplot as plt import nu...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Localization/unscented_kalman_filter/unscented_kalman_filter.py", "license": "mit", "size": 6408}
### File: Mapping/circle_fitting/circle_fitting.py """ Object shape recognition with circle fitting author: Atsushi Sakai (@Atsushi_twi) """ import matplotlib.pyplot as plt import math import random import numpy as np show_animation = True def circle_fitting(x, y): """ Circle Fitting with least squared ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/circle_fitting/circle_fitting.py", "license": "mit", "size": 3764}
### File: Mapping/gaussian_grid_map/gaussian_grid_map.py """ 2D gaussian grid map sample author: Atsushi Sakai (@Atsushi_twi) """ import math import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm EXTEND_AREA = 10.0 # [m] grid map extention length show_animation = True def generate_gau...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/gaussian_grid_map/gaussian_grid_map.py", "license": "mit", "size": 2397}
### File: Mapping/grid_map_lib/grid_map_lib.py """ Grid map library in python author: Atsushi Sakai """ from functools import total_ordering import matplotlib.pyplot as plt import numpy as np @total_ordering class FloatGrid: def __init__(self, init_val=0.0): self.data = init_val def get_float_dat...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/grid_map_lib/grid_map_lib.py", "license": "mit", "size": 9509}
### File: Mapping/kmeans_clustering/kmeans_clustering.py """ Object clustering with k-means algorithm author: Atsushi Sakai (@Atsushi_twi) """ import math import matplotlib.pyplot as plt import random # k means parameters MAX_LOOP = 10 DCOST_TH = 0.1 show_animation = True def kmeans_clustering(rx, ry, nc): c...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/kmeans_clustering/kmeans_clustering.py", "license": "mit", "size": 3611}
### File: Mapping/lidar_to_grid_map/lidar_to_grid_map.py """ LIDAR to 2D grid map example author: Erno Horvath, Csaba Hajdu based on Atsushi Sakai's scripts """ import math from collections import deque import matplotlib.pyplot as plt import numpy as np EXTEND_AREA = 1.0 def file_read(f): """ Reading LI...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/lidar_to_grid_map/lidar_to_grid_map.py", "license": "mit", "size": 8344}
### File: Mapping/ndt_map/ndt_map.py """ Normal Distribution Transform (NDTGrid) mapping sample """ import matplotlib.pyplot as plt import numpy as np from collections import defaultdict from Mapping.grid_map_lib.grid_map_lib import GridMap from utils.plot import plot_covariance_ellipse class NDTMap: """ Nor...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/ndt_map/ndt_map.py", "license": "mit", "size": 4296}
### File: Mapping/normal_vector_estimation/normal_vector_estimation.py import numpy as np from matplotlib import pyplot as plt from utils.plot import plot_3d_vector_arrow, plot_triangle, set_equal_3d_axis show_animation = True def calc_normal_vector(p1, p2, p3): """Calculate normal vector of triangle Param...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/normal_vector_estimation/normal_vector_estimation.py", "license": "mit", "size": 5249}
### File: Mapping/point_cloud_sampling/point_cloud_sampling.py """ Point cloud sampling example codes. This code supports - Voxel point sampling - Farthest point sampling - Poisson disk sampling """ import matplotlib.pyplot as plt import numpy as np import numpy.typing as npt from collections import defaultdict do_pl...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/point_cloud_sampling/point_cloud_sampling.py", "license": "mit", "size": 5732}
### File: Mapping/raycasting_grid_map/raycasting_grid_map.py """ Ray casting 2D grid map example author: Atsushi Sakai (@Atsushi_twi) """ import math import numpy as np import matplotlib.pyplot as plt EXTEND_AREA = 10.0 show_animation = True def calc_grid_map_config(ox, oy, xyreso): minx = round(min(ox) - E...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/raycasting_grid_map/raycasting_grid_map.py", "license": "mit", "size": 3464}
### File: Mapping/rectangle_fitting/__init_.py import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent))
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/rectangle_fitting/__init_.py", "license": "mit", "size": 78}
### File: Mapping/rectangle_fitting/rectangle_fitting.py """ Object shape recognition with L-shape fitting author: Atsushi Sakai (@Atsushi_twi) Ref: - Efficient L-Shape Fitting for Vehicle Detection Using Laser Scanners - The Robotics Institute Carnegie Mellon University https://www.ri.cmu.edu/publications/ efficien...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/rectangle_fitting/rectangle_fitting.py", "license": "mit", "size": 8618}
### File: Mapping/rectangle_fitting/simulator.py """ Simulator author: Atsushi Sakai """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) import numpy as np import matplotlib.pyplot as plt import math import random from utils.angle import rot_mat_2d class VehicleSimula...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "Mapping/rectangle_fitting/simulator.py", "license": "mit", "size": 3819}
### File: PathPlanning/AStar/a_star.py """ A* grid planning author: Atsushi Sakai(@Atsushi_twi) Nikos Kanargias (nkana@tee.gr) See Wikipedia article (https://en.wikipedia.org/wiki/A*_search_algorithm) """ import math import matplotlib.pyplot as plt show_animation = True class AStarPlanner: def __i...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/AStar/a_star.py", "license": "mit", "size": 8717}
### File: PathPlanning/AStar/a_star_searching_from_two_side.py """ A* algorithm Author: Weicent randomly generate obstacles, start and goal point searching path from start and end simultaneously """ import numpy as np import matplotlib.pyplot as plt import math show_animation = True class Node: """node with pro...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/AStar/a_star_searching_from_two_side.py", "license": "mit", "size": 13899}
### File: PathPlanning/AStar/a_star_variants.py """ a star variants author: Sarim Mehdi(muhammadsarim.mehdi@studio.unibo.it) Source: http://theory.stanford.edu/~amitp/GameProgramming/Variations.html """ import numpy as np import matplotlib.pyplot as plt show_animation = True use_beam_search = False use_iterative_deep...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/AStar/a_star_variants.py", "license": "mit", "size": 18918}
### File: PathPlanning/BSplinePath/bspline_path.py """ Path Planner with B-Spline author: Atsushi Sakai (@Atsushi_twi) """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as interpolate from util...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/BSplinePath/bspline_path.py", "license": "mit", "size": 4404}
### File: PathPlanning/BatchInformedRRTStar/batch_informed_rrtstar.py """ Batch Informed Trees based path planning: Uses a heuristic to efficiently search increasingly dense RGGs while reusing previous information. Provides faster convergence that RRT*, Informed RRT* and other sampling based methods. Uses lazy connect...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/BatchInformedRRTStar/batch_informed_rrtstar.py", "license": "mit", "size": 23993}
### File: PathPlanning/BezierPath/bezier_path.py """ Path planning with Bezier curve. author: Atsushi Sakai(@Atsushi_twi) """ import matplotlib.pyplot as plt import numpy as np import scipy.special show_animation = True def calc_4points_bezier_path(sx, sy, syaw, ex, ey, eyaw, offset): """ Compute control...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/BezierPath/bezier_path.py", "license": "mit", "size": 6811}
### File: PathPlanning/BidirectionalAStar/bidirectional_a_star.py """ Bidirectional A* grid planning author: Erwin Lejeune (@spida_rwin) See Wikipedia article (https://en.wikipedia.org/wiki/Bidirectional_search) """ import math import matplotlib.pyplot as plt show_animation = True class BidirectionalAStarPlann...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/BidirectionalAStar/bidirectional_a_star.py", "license": "mit", "size": 11287}
### File: PathPlanning/BidirectionalBreadthFirstSearch/bidirectional_breadth_first_search.py """ Bidirectional Breadth-First grid planning author: Erwin Lejeune (@spida_rwin) See Wikipedia article (https://en.wikipedia.org/wiki/Breadth-first_search) """ import math import matplotlib.pyplot as plt show_animation ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/BidirectionalBreadthFirstSearch/bidirectional_breadth_first_search.py", "license": "mit", "si...
### File: PathPlanning/BreadthFirstSearch/breadth_first_search.py """ Breadth-First grid planning author: Erwin Lejeune (@spida_rwin) See Wikipedia article (https://en.wikipedia.org/wiki/Breadth-first_search) """ import math import matplotlib.pyplot as plt show_animation = True class BreadthFirstSearchPlanner:...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/BreadthFirstSearch/breadth_first_search.py", "license": "mit", "size": 7701}
### File: PathPlanning/BugPlanning/bug.py """ Bug Planning author: Sarim Mehdi(muhammadsarim.mehdi@studio.unibo.it) Source: https://sites.google.com/site/ece452bugalgorithms/ """ import numpy as np import matplotlib.pyplot as plt show_animation = True class BugPlanner: def __init__(self, start_x, start_y, goal_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/BugPlanning/bug.py", "license": "mit", "size": 12636}
### File: PathPlanning/Catmull_RomSplinePath/blending_functions.py import numpy as np import matplotlib.pyplot as plt def blending_function_1(t): return -t + 2*t**2 - t**3 def blending_function_2(t): return 2 - 5*t**2 + 3*t**3 def blending_function_3(t): return t + 4*t**2 - 3*t**3 def blending_function_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/Catmull_RomSplinePath/blending_functions.py", "license": "mit", "size": 860}
### File: PathPlanning/Catmull_RomSplinePath/catmull_rom_spline_path.py """ Path Planner with Catmull-Rom Spline Author: Surabhi Gupta (@this_is_surabhi) Source: http://graphics.cs.cmu.edu/nsp/course/15-462/Fall04/assts/catmullRom.pdf """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.pare...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/Catmull_RomSplinePath/catmull_rom_spline_path.py", "license": "mit", "size": 2292}
### File: PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py """ Path planning Sample Code with Closed loop RRT for car like robot. author: AtsushiSakai(@Atsushi_twi) """ import matplotlib.pyplot as plt import numpy as np import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent)) ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py", "license": "mit", "size": 6222}
### File: PathPlanning/ClosedLoopRRTStar/pure_pursuit.py """ Path tracking simulation with pure pursuit steering control and PID speed control. author: Atsushi Sakai """ import math import matplotlib.pyplot as plt import numpy as np import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ClosedLoopRRTStar/pure_pursuit.py", "license": "mit", "size": 7679}
### File: PathPlanning/ClosedLoopRRTStar/unicycle_model.py """ Unicycle model class author Atsushi Sakai """ import math import numpy as np from utils.angle import angle_mod dt = 0.05 # [s] L = 0.9 # [m] steer_max = np.deg2rad(40.0) curvature_max = math.tan(steer_max) / L curvature_max = 1.0 / curvature_max + 1....
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ClosedLoopRRTStar/unicycle_model.py", "license": "mit", "size": 1413}
### File: PathPlanning/ClothoidPath/clothoid_path_planner.py """ Clothoid Path Planner Author: Daniel Ingram (daniel-s-ingram) Atsushi Sakai (AtsushiSakai) Reference paper: Fast and accurate G1 fitting of clothoid curves https://www.researchgate.net/publication/237062806 """ from collections import namedtuple ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ClothoidPath/clothoid_path_planner.py", "license": "mit", "size": 5742}
### File: PathPlanning/CubicSpline/cubic_spline_planner.py """ Cubic spline planner Author: Atsushi Sakai(@Atsushi_twi) """ import math import numpy as np import bisect class CubicSpline1D: """ 1D Cubic Spline class Parameters ---------- x : list x coordinates for data points. This x co...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/CubicSpline/cubic_spline_planner.py", "license": "mit", "size": 9677}
### File: PathPlanning/CubicSpline/spline_continuity.py import numpy as np import matplotlib.pyplot as plt from scipy import interpolate class Spline2D: def __init__(self, x, y, kind="cubic"): self.s = self.__calc_s(x, y) self.sx = interpolate.interp1d(self.s, x, kind=kind) self.sy = int...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/CubicSpline/spline_continuity.py", "license": "mit", "size": 1408}
### File: PathPlanning/DStar/dstar.py """ D* grid planning author: Nirnay Roy See Wikipedia article (https://en.wikipedia.org/wiki/D*) """ import math from sys import maxsize import matplotlib.pyplot as plt show_animation = True class State: def __init__(self, x, y): self.x = x self.y = y...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/DStar/dstar.py", "license": "mit", "size": 6432}
### File: PathPlanning/DStarLite/d_star_lite.py """ D* Lite grid planning author: vss2sn (28676655+vss2sn@users.noreply.github.com) Link to papers: D* Lite (Link: http://idm-lab.org/bib/abstracts/papers/aaai02b.pdf) Improved Fast Replanning for Robot Navigation in Unknown Terrain (Link: http://www.cs.cmu.edu/~maxim/fil...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/DStarLite/d_star_lite.py", "license": "mit", "size": 17271}
### File: PathPlanning/DepthFirstSearch/depth_first_search.py """ Depth-First grid planning author: Erwin Lejeune (@spida_rwin) See Wikipedia article (https://en.wikipedia.org/wiki/Depth-first_search) """ import math import matplotlib.pyplot as plt show_animation = True class DepthFirstSearchPlanner: def ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/DepthFirstSearch/depth_first_search.py", "license": "mit", "size": 7601}
### File: PathPlanning/Dijkstra/dijkstra.py """ Grid based Dijkstra planning author: Atsushi Sakai(@Atsushi_twi) """ import matplotlib.pyplot as plt import math show_animation = True class Dijkstra: def __init__(self, ox, oy, resolution, robot_radius): """ Initialize map for a star planning ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/Dijkstra/dijkstra.py", "license": "mit", "size": 7853}
### File: PathPlanning/DubinsPath/dubins_path_planner.py """ Dubins path planner sample code author Atsushi Sakai(@Atsushi_twi) """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) from math import sin, cos, atan2, sqrt, acos, pi, hypot import numpy as np from utils.angle ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/DubinsPath/dubins_path_planner.py", "license": "mit", "size": 10216}
### File: PathPlanning/DynamicMovementPrimitives/dynamic_movement_primitives.py """ Author: Jonathan Schwartz (github.com/SchwartzCode) This code provides a simple implementation of Dynamic Movement Primitives, which is an approach to learning curves by modelling them as a weighted sum of gaussian distributions. This ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/DynamicMovementPrimitives/dynamic_movement_primitives.py", "license": "mit", "size": 8485}
### File: PathPlanning/DynamicWindowApproach/dynamic_window_approach.py """ Mobile robot motion planning sample with Dynamic Window Approach author: Atsushi Sakai (@Atsushi_twi), Göktuğ Karakaşlı """ import math from enum import Enum import matplotlib.pyplot as plt import numpy as np show_animation = True def d...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/DynamicWindowApproach/dynamic_window_approach.py", "license": "mit", "size": 10138}
### File: PathPlanning/Eta3SplinePath/eta3_spline_path.py """ eta^3 polynomials planner author: Joe Dinius, Ph.D (https://jwdinius.github.io) Atsushi Sakai (@Atsushi_twi) Ref: - [eta^3-Splines for the Smooth Path Generation of Wheeled Mobile Robots] (https://ieeexplore.ieee.org/document/4339545/) """ impor...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/Eta3SplinePath/eta3_spline_path.py", "license": "mit", "size": 13649}
### File: PathPlanning/Eta3SplineTrajectory/eta3_spline_trajectory.py """ eta^3 polynomials trajectory planner author: Joe Dinius, Ph.D (https://jwdinius.github.io) Atsushi Sakai (@Atsushi_twi) Refs: - https://jwdinius.github.io/blog/2018/eta3traj - [eta^3-Splines for the Smooth Path Generation of Wheeled Mo...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/Eta3SplineTrajectory/eta3_spline_trajectory.py", "license": "mit", "size": 18686}
### File: PathPlanning/FlowField/flowfield.py """ flowfield pathfinding author: Sarim Mehdi (muhammadsarim.mehdi@studio.unibo.it) Source: https://leifnode.com/2013/12/flow-field-pathfinding/ """ import numpy as np import matplotlib.pyplot as plt show_animation = True def draw_horizontal_line(start_x, start_y, lengt...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/FlowField/flowfield.py", "license": "mit", "size": 8876}
### File: PathPlanning/FrenetOptimalTrajectory/frenet_optimal_trajectory.py """ Frenet optimal trajectory generator author: Atsushi Sakai (@Atsushi_twi) Ref: - [Optimal Trajectory Generation for Dynamic Street Scenarios in a Frenet Frame] (https://www.researchgate.net/profile/Moritz_Werling/publication/224156269_Op...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/FrenetOptimalTrajectory/frenet_optimal_trajectory.py", "license": "mit", "size": 9421}
### File: PathPlanning/GreedyBestFirstSearch/greedy_best_first_search.py """ Greedy Best-First grid planning author: Erwin Lejeune (@spida_rwin) See Wikipedia article (https://en.wikipedia.org/wiki/Best-first_search) """ import math import matplotlib.pyplot as plt show_animation = True class BestFirstSearchPla...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/GreedyBestFirstSearch/greedy_best_first_search.py", "license": "mit", "size": 8238}
### File: PathPlanning/GridBasedSweepCPP/grid_based_sweep_coverage_path_planner.py """ Grid based sweep planner author: Atsushi Sakai """ import math from enum import IntEnum import numpy as np import matplotlib.pyplot as plt import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/GridBasedSweepCPP/grid_based_sweep_coverage_path_planner.py", "license": "mit", "size": 10460...
### File: PathPlanning/HybridAStar/__init__.py import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)))
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/HybridAStar/__init__.py", "license": "mit", "size": 82}
### File: PathPlanning/HybridAStar/car.py """ Car model for Hybrid A* path planning author: Zheng Zh (@Zhengzh) """ import sys import pathlib root_dir = pathlib.Path(__file__).parent.parent.parent sys.path.append(str(root_dir)) from math import cos, sin, tan, pi import matplotlib.pyplot as plt import numpy as np ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/HybridAStar/car.py", "license": "mit", "size": 2957}
### File: PathPlanning/HybridAStar/dynamic_programming_heuristic.py """ A* grid based planning author: Nikos Kanargias (nkana@tee.gr) See Wikipedia article (https://en.wikipedia.org/wiki/A*_search_algorithm) """ import heapq import math import matplotlib.pyplot as plt show_animation = False class Node: de...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/HybridAStar/dynamic_programming_heuristic.py", "license": "mit", "size": 5030}
### File: PathPlanning/HybridAStar/hybrid_a_star.py """ Hybrid A* path planning author: Zheng Zh (@Zhengzh) """ import heapq import math import matplotlib.pyplot as plt import numpy as np from scipy.spatial import cKDTree import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent)) from dyn...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/HybridAStar/hybrid_a_star.py", "license": "mit", "size": 12978}
### File: PathPlanning/InformedRRTStar/informed_rrt_star.py """ Informed RRT* path planning author: Karan Chawla Atsushi Sakai(@Atsushi_twi) Reference: Informed RRT*: Optimal Sampling-based Path planning Focused via Direct Sampling of an Admissible Ellipsoidal Heuristic https://arxiv.org/pdf/1404.2334.pdf ""...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/InformedRRTStar/informed_rrt_star.py", "license": "mit", "size": 12161}
### File: PathPlanning/LQRPlanner/lqr_planner.py """ LQR local path planning author: Atsushi Sakai (@Atsushi_twi) """ import math import random import matplotlib.pyplot as plt import numpy as np import scipy.linalg as la SHOW_ANIMATION = True class LQRPlanner: def __init__(self): self.MAX_TIME = 10...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/LQRPlanner/lqr_planner.py", "license": "mit", "size": 3455}
### File: PathPlanning/LQRRRTStar/lqr_rrt_star.py """ Path planning code with LQR RRT* author: AtsushiSakai(@Atsushi_twi) """ import copy import math import random import matplotlib.pyplot as plt import numpy as np import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent)) from LQRPlanner....
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/LQRRRTStar/lqr_rrt_star.py", "license": "mit", "size": 7130}
### File: PathPlanning/ModelPredictiveTrajectoryGenerator/lookup_table_generator.py """ Lookup Table generation for model predictive trajectory generator author: Atsushi Sakai """ import sys import pathlib path_planning_dir = pathlib.Path(__file__).parent.parent sys.path.append(str(path_planning_dir)) from matplotl...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ModelPredictiveTrajectoryGenerator/lookup_table_generator.py", "license": "mit", "size": 2775...
### File: PathPlanning/ModelPredictiveTrajectoryGenerator/motion_model.py import math import numpy as np from scipy.interpolate import interp1d from utils.angle import angle_mod # motion parameter L = 1.0 # wheel base ds = 0.1 # course distance v = 10.0 / 3.6 # velocity [m/s] class State: def __init__(self, ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ModelPredictiveTrajectoryGenerator/motion_model.py", "license": "mit", "size": 2166}
### File: PathPlanning/ModelPredictiveTrajectoryGenerator/trajectory_generator.py """ Model trajectory generator author: Atsushi Sakai(@Atsushi_twi) """ import math import matplotlib.pyplot as plt import numpy as np import sys import pathlib path_planning_dir = pathlib.Path(__file__).parent.parent sys.path.append(s...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ModelPredictiveTrajectoryGenerator/trajectory_generator.py", "license": "mit", "size": 4407}
### File: PathPlanning/PotentialFieldPlanning/potential_field_planning.py """ Potential Field based path planner author: Atsushi Sakai (@Atsushi_twi) Ref: https://www.cs.cmu.edu/~motionplanning/lecture/Chap4-Potential-Field_howie.pdf """ from collections import deque import numpy as np import matplotlib.pyplot as ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/PotentialFieldPlanning/potential_field_planning.py", "license": "mit", "size": 5126}
### File: PathPlanning/ProbabilisticRoadMap/probabilistic_road_map.py """ Probabilistic Road Map (PRM) Planner author: Atsushi Sakai (@Atsushi_twi) """ import math import numpy as np import matplotlib.pyplot as plt from scipy.spatial import KDTree # parameter N_SAMPLE = 500 # number of sample_points N_KNN = 10 #...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ProbabilisticRoadMap/probabilistic_road_map.py", "license": "mit", "size": 8195}
### File: PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py """ Quintic Polynomials Planner author: Atsushi Sakai (@Atsushi_twi) Ref: - [Local Path planning And Motion Control For Agv In Positioning](http://ieeexplore.ieee.org/document/637936/) """ import math import matplotlib.pyplot as plt ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py", "license": "mit", "size": 6680}
### File: PathPlanning/RRT/rrt.py """ Path planning Sample Code with Randomized Rapidly-Exploring Random Trees (RRT) author: AtsushiSakai(@Atsushi_twi) """ import math import random import matplotlib.pyplot as plt import numpy as np show_animation = True class RRT: """ Class for RRT planning """ ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRT/rrt.py", "license": "mit", "size": 9047}
### File: PathPlanning/RRT/rrt_with_pathsmoothing.py """ Path planning Sample Code with RRT with path smoothing @author: AtsushiSakai(@Atsushi_twi) """ import math import random import matplotlib.pyplot as plt import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent)) from rrt import RRT show_a...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRT/rrt_with_pathsmoothing.py", "license": "mit", "size": 3306}
### File: PathPlanning/RRT/rrt_with_sobol_sampler.py """ Path planning Sample Code with Randomized Rapidly-Exploring Random Trees with sobol low discrepancy sampler(RRTSobol). Sobol wiki https://en.wikipedia.org/wiki/Sobol_sequence The goal of low discrepancy samplers is to generate a sequence of points that optimize...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRT/rrt_with_sobol_sampler.py", "license": "mit", "size": 8762}
### File: PathPlanning/RRT/sobol/__init__.py from .sobol import i4_sobol as sobol_quasirand
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRT/sobol/__init__.py", "license": "mit", "size": 47}
### File: PathPlanning/RRT/sobol/sobol.py """ Licensing: This code is distributed under the MIT license. Authors: Original FORTRAN77 version of i4_sobol by Bennett Fox. MATLAB version by John Burkardt. PYTHON version by Corrado Chisari Original Python version of is_prime by Corrado Chisari ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRT/sobol/sobol.py", "license": "mit", "size": 21902}
### File: PathPlanning/RRTDubins/rrt_dubins.py """ Path planning Sample Code with RRT with Dubins path author: AtsushiSakai(@Atsushi_twi) """ import copy import math import random import numpy as np import matplotlib.pyplot as plt import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.pare...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRTDubins/rrt_dubins.py", "license": "mit", "size": 7263}
### File: PathPlanning/RRTStar/rrt_star.py """ Path planning Sample Code with RRT* author: Atsushi Sakai(@Atsushi_twi) """ import math import sys import matplotlib.pyplot as plt import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent)) from RRT.rrt import RRT show_animation = True class RRTStar(...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRTStar/rrt_star.py", "license": "mit", "size": 9512}
### File: PathPlanning/RRTStarDubins/rrt_star_dubins.py """ Path planning Sample Code with RRT and Dubins path author: AtsushiSakai(@Atsushi_twi) """ import copy import math import random import matplotlib.pyplot as plt import numpy as np import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.par...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRTStarDubins/rrt_star_dubins.py", "license": "mit", "size": 7673}
### File: PathPlanning/RRTStarReedsShepp/rrt_star_reeds_shepp.py """ Path planning Sample Code with RRT with Reeds-Shepp path author: AtsushiSakai(@Atsushi_twi) """ import copy import math import random import sys import pathlib import matplotlib.pyplot as plt import numpy as np sys.path.append(str(pathlib.Path(__fi...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/RRTStarReedsShepp/rrt_star_reeds_shepp.py", "license": "mit", "size": 8265}
### File: PathPlanning/ReedsSheppPath/reeds_shepp_path_planning.py """ Reeds Shepp path planner sample code author Atsushi Sakai(@Atsushi_twi) co-author Videh Patel(@videh25) : Added the missing RS paths """ import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) import math imp...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/ReedsSheppPath/reeds_shepp_path_planning.py", "license": "mit", "size": 14855}
### File: PathPlanning/SpiralSpanningTreeCPP/spiral_spanning_tree_coverage_path_planner.py """ Spiral Spanning Tree Coverage Path Planner author: Todd Tang paper: Spiral-STC: An On-Line Coverage Algorithm of Grid Environments by a Mobile Robot - Gabriely et.al. link: https://ieeexplore.ieee.org/abstract/docum...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/SpiralSpanningTreeCPP/spiral_spanning_tree_coverage_path_planner.py", "license": "mit", "size...
### File: PathPlanning/StateLatticePlanner/state_lattice_planner.py """ State lattice planner with model predictive trajectory generator author: Atsushi Sakai (@Atsushi_twi) - plookuptable.csv is generated with this script: https://github.com/AtsushiSakai/PythonRobotics/blob/master/PathPlanning /ModelPredictiveTraje...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/StateLatticePlanner/state_lattice_planner.py", "license": "mit", "size": 8738}
### File: PathPlanning/VisibilityRoadMap/geometry.py class Geometry: class Point: def __init__(self, x, y): self.x = x self.y = y @staticmethod def is_seg_intersect(p1, q1, p2, q2): def on_segment(p, q, r): if ((q.x <= max(p.x, r.x)) and (q.x >= min(p.x...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/VisibilityRoadMap/geometry.py", "license": "mit", "size": 1278}
### File: PathPlanning/VisibilityRoadMap/visibility_road_map.py """ Visibility Road Map Planner author: Atsushi Sakai (@Atsushi_twi) """ import sys import math import numpy as np import matplotlib.pyplot as plt import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent)) from VisibilityRoadMap.geometr...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/VisibilityRoadMap/visibility_road_map.py", "license": "mit", "size": 6606}
### File: PathPlanning/VoronoiRoadMap/dijkstra_search.py """ Dijkstra Search library author: Atsushi Sakai (@Atsushi_twi) """ import matplotlib.pyplot as plt import math import numpy as np class DijkstraSearch: class Node: """ Node class for dijkstra search """ def __init__(se...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/VoronoiRoadMap/dijkstra_search.py", "license": "mit", "size": 4504}
### File: PathPlanning/VoronoiRoadMap/voronoi_road_map.py """ Voronoi Road Map Planner author: Atsushi Sakai (@Atsushi_twi) """ import math import numpy as np import matplotlib.pyplot as plt from scipy.spatial import cKDTree, Voronoi import sys import pathlib sys.path.append(str(pathlib.Path(__file__).parent.parent...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/VoronoiRoadMap/voronoi_road_map.py", "license": "mit", "size": 4823}
### File: PathPlanning/WavefrontCPP/wavefront_coverage_path_planner.py """ Distance/Path Transform Wavefront Coverage Path Planner author: Todd Tang paper: Planning paths of complete coverage of an unstructured environment by a mobile robot - Zelinsky et.al. link: http://pinkwink.kr/attachment/cfile3.uf@13546...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathPlanning/WavefrontCPP/wavefront_coverage_path_planner.py", "license": "mit", "size": 6926}
### File: PathTracking/cgmres_nmpc/cgmres_nmpc.py """ Nonlinear MPC simulation with CGMRES author Atsushi Sakai (@Atsushi_twi) Ref: Shunichi09/nonlinear_control: Implementing the nonlinear model predictive control, sliding mode control https://github.com/Shunichi09/nonlinear_control """ from math import cos, sin, ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathTracking/cgmres_nmpc/cgmres_nmpc.py", "license": "mit", "size": 20191}
### File: PathTracking/lqr_speed_steer_control/lqr_speed_steer_control.py """ Path tracking simulation with LQR speed and steering control author Atsushi Sakai (@Atsushi_twi) """ import math import sys import matplotlib.pyplot as plt import numpy as np import scipy.linalg as la import pathlib from utils.angle import...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathTracking/lqr_speed_steer_control/lqr_speed_steer_control.py", "license": "mit", "size": 7741}
### File: PathTracking/lqr_steer_control/lqr_steer_control.py """ Path tracking simulation with LQR steering control and PID speed control. author Atsushi Sakai (@Atsushi_twi) """ import scipy.linalg as la import matplotlib.pyplot as plt import math import numpy as np import sys import pathlib from utils.angle impor...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathTracking/lqr_steer_control/lqr_steer_control.py", "license": "mit", "size": 6687}
### File: PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py """ Path tracking simulation with iterative linear model predictive control for speed and steer control author: Atsushi Sakai (@Atsushi_twi) """ import matplotlib.pyplot as plt import time import cvxpy import ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py", "licen...
### File: PathTracking/pure_pursuit/pure_pursuit.py """ Path tracking simulation with pure pursuit steering and PID speed control. author: Atsushi Sakai (@Atsushi_twi) Guillaume Jacquenot (@Gjacquenot) """ import numpy as np import math import matplotlib.pyplot as plt # Parameters k = 0.1 # look forward ga...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathTracking/pure_pursuit/pure_pursuit.py", "license": "mit", "size": 6184}