text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```python
import conftest # Add root path to sys.path
from PathPlanning.PotentialFieldPlanning import potential_field_planning as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_potential_field_planning.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 63 |
```python
import conftest
from SLAM.FastSLAM2 import fast_slam2 as m
def test1():
m.show_animation = False
m.SIM_TIME = 3.0
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_fast_slam2.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 66 |
```python
import conftest
from Localization.extended_kalman_filter import extended_kalman_filter as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_extended_kalman_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 57 |
```python
import conftest # Add root path to sys.path
from ArmNavigation.n_joint_arm_to_point_control\
import n_joint_arm_to_point_control as m
import random
random.seed(12345)
def test1():
m.show_animation = False
m.animation()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_n_joint_arm_to_point_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 77 |
```python
import conftest
import PathPlanning.FlowField.flowfield as flow_field
def test():
flow_field.show_animation = False
flow_field.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_flow_field.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 51 |
```python
import conftest # Add root path to sys.path
from Mapping.normal_vector_estimation import normal_vector_estimation as m
import random
random.seed(12345)
def test_1():
m.show_animation = False
m.main1()
def test_2():
m.show_animation = False
m.main2()
if __name__ == '__main__':
conft... | /content/code_sandbox/tests/test_normal_vector_estimation.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 89 |
```python
import conftest # Add root path to sys.path
from PathPlanning.VoronoiRoadMap import voronoi_road_map as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_visibility_road_map_planner.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 65 |
```yaml
theme: jekyll-theme-slate
show_downloads: true
``` | /content/code_sandbox/_config.yml | yaml | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 15 |
```python
import conftest # Add root path to sys.path
import numpy as np
from PathPlanning.ProbabilisticRoadMap import probabilistic_road_map
def test1():
probabilistic_road_map.show_animation = False
probabilistic_road_map.main(rng=np.random.default_rng(1233))
if __name__ == '__main__':
conftest.run_t... | /content/code_sandbox/tests/test_probabilistic_road_map.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 84 |
```python
import conftest
from PathPlanning.GreedyBestFirstSearch import greedy_best_first_search as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_greedy_best_first_search.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 57 |
```python
import conftest # Add root path to sys.path
from PathPlanning.StateLatticePlanner import state_lattice_planner as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_state_lattice_planner.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 64 |
```python
import conftest
from PathPlanning.ClosedLoopRRTStar import closed_loop_rrt_star_car as m
import random
def test_1():
random.seed(12345)
m.show_animation = False
m.main(gx=1.0, gy=0.0, gyaw=0.0, max_iter=5)
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_closed_loop_rrt_star_car.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 92 |
```python
import conftest # Add root path to sys.path
from PathPlanning.RRTStarReedsShepp import rrt_star_reeds_shepp as m
def test1():
m.show_animation = False
m.main(max_iter=5)
obstacleList = [
(5, 5, 1),
(4, 6, 1),
(4, 8, 1),
(4, 10, 1),
(6, 5, 1),
(7, 5, 1),
(8, 6, 1),
(... | /content/code_sandbox/tests/test_rrt_star_reeds_shepp.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 481 |
```python
import conftest
from SLAM.EKFSLAM import ekf_slam as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_ekf_slam.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 55 |
```python
import conftest
from PathPlanning.Eta3SplinePath import eta3_spline_path as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_eta3_spline_path.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 58 |
```python
import conftest
from PathPlanning.Dijkstra import dijkstra as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_dijkstra.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 52 |
```python
import conftest # Add root path to sys.path
from Mapping.rectangle_fitting import rectangle_fitting as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_rectangle_fitting.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 59 |
```python
import conftest # Add root path to sys.path
import numpy as np
from numpy.testing import suppress_warnings
from AerialNavigation.rocket_powered_landing import rocket_powered_landing as m
def test1():
m.show_animation = False
with suppress_warnings() as sup:
sup.filter(UserWarning,
... | /content/code_sandbox/tests/test_rocket_powered_landing.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 130 |
```python
import conftest
from PathPlanning.DStar import dstar as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_dstar.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 51 |
```python
import conftest # Add root path to sys.path
from utils import angle
from numpy.testing import assert_allclose
import numpy as np
def test_rot_mat_2d():
assert_allclose(angle.rot_mat_2d(0.0),
np.array([[1., 0.],
[0., 1.]]))
def test_angle_mod():
as... | /content/code_sandbox/tests/test_utils.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 224 |
```python
"""Path hack to make tests work."""
import sys
import os
import pytest
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(TEST_DIR) # to import this file from test code.
ROOT_DIR = os.path.dirname(TEST_DIR)
sys.path.append(ROOT_DIR)
def run_this_test(file):
pytest.main([os.path.absp... | /content/code_sandbox/tests/conftest.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 76 |
```python
import conftest # Add root path to sys.path
from PathTracking.lqr_steer_control import lqr_steer_control as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_lqr_steer_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 64 |
```python
import conftest # Add root path to sys.path
import os
import matplotlib.pyplot as plt
from PathPlanning.SpiralSpanningTreeCPP \
import spiral_spanning_tree_coverage_path_planner
spiral_spanning_tree_coverage_path_planner.do_animation = True
def spiral_stc_cpp(img, start):
num_free = 0
for i in... | /content/code_sandbox/tests/test_spiral_spanning_tree_coverage_path_planner.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 443 |
```python
import conftest
from PathPlanning.HybridAStar import hybrid_a_star as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_hybrid_a_star.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 53 |
```python
import conftest # Add root path to sys.path
from PathPlanning.LQRRRTStar import lqr_rrt_star as m
import random
random.seed(12345)
def test1():
m.show_animation = False
m.main(maxIter=5)
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_lqr_rrt_star.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 77 |
```python
import conftest
from Mapping.kmeans_clustering import kmeans_clustering as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_kmeans_clustering.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 54 |
```python
import conftest
from SLAM.iterative_closest_point import iterative_closest_point as m
def test_1():
m.show_animation = False
m.main()
def test_2():
m.show_animation = False
m.main_3d_points()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_iterative_closest_point.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 76 |
```python
import conftest
from PathPlanning.InformedRRTStar import informed_rrt_star as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_informed_rrt_star.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 55 |
```python
import conftest
import numpy as np
import pytest
from PathPlanning.BSplinePath import bspline_path
def test_list_input():
way_point_x = [-1.0, 3.0, 4.0, 2.0, 1.0]
way_point_y = [0.0, -3.0, 1.0, 1.0, 3.0]
n_course_point = 50 # sampling number
rax, ray, heading, curvature = bspline_path.appr... | /content/code_sandbox/tests/test_bspline_path.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 833 |
```python
import conftest # Add root path to sys.path
from Mapping.raycasting_grid_map import raycasting_grid_map as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_raycasting_grid_map.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 62 |
```python
import conftest
from SLAM.FastSLAM1 import fast_slam1 as m
def test1():
m.show_animation = False
m.SIM_TIME = 3.0
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_fast_slam1.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 66 |
```python
import conftest # Add root path to sys.path
from PathPlanning.RRTStarDubins import rrt_star_dubins as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_rrt_star_dubins.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 65 |
```python
import conftest
import random
from PathPlanning.RRT import rrt as m
from PathPlanning.RRT import rrt_with_pathsmoothing as m1
random.seed(12345)
def test1():
m.show_animation = False
m.main(gx=1.0, gy=1.0)
def test2():
m1.show_animation = False
m1.main()
if __name__ == '__main__':
... | /content/code_sandbox/tests/test_rrt.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 104 |
```python
import PathPlanning.AStar.a_star_variants as a_star
import conftest
def test_1():
# A* with beam search
a_star.show_animation = False
a_star.use_beam_search = True
a_star.main()
reset_all()
# A* with iterative deepening
a_star.use_iterative_deepening = True
a_star.main()
... | /content/code_sandbox/tests/test_a_star_variants.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 240 |
```python
import conftest
from Mapping.gaussian_grid_map import gaussian_grid_map as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_gaussian_grid_map.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 52 |
```python
import conftest # Add root path to sys.path
from Mapping.point_cloud_sampling import point_cloud_sampling as m
def test_1(capsys):
m.do_plot = False
m.main()
captured = capsys.readouterr()
assert "voxel_sampling_points.shape=(27, 3)" in captured.out
assert "farthest_sampling_points.shap... | /content/code_sandbox/tests/test_point_cloud_sampling.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 126 |
```python
import conftest
from PathPlanning.DepthFirstSearch import depth_first_search as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_depth_first_search.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 53 |
```python
import conftest
from Localization.histogram_filter import histogram_filter as m
def test1():
m.show_animation = False
m.SIM_TIME = 1.0
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_histogram_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 60 |
```python
import conftest
from SLAM.GraphBasedSLAM import graph_based_slam as m
def test_1():
m.show_animation = False
m.SIM_TIME = 20.0
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_graph_based_slam.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 66 |
```python
import conftest # Add root path to sys.path
from Control.move_to_pose import move_to_pose as m
def test_1():
"""
This unit test tests the move_to_pose_robot.py program
"""
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_move_to_pose_robot.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 77 |
```python
import conftest # Add root path to sys.path
from PathTracking.model_predictive_speed_and_steer_control \
import model_predictive_speed_and_steer_control as m
def test_1():
m.show_animation = False
m.main()
def test_2():
m.show_animation = False
m.main2()
if __name__ == '__main__':
... | /content/code_sandbox/tests/test_model_predictive_speed_and_steer_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 90 |
```python
import conftest
import numpy as np
from PathPlanning.DynamicMovementPrimitives import \
dynamic_movement_primitives
def test_1():
# test that trajectory can be learned from user-passed data
T = 5
t = np.arange(0, T, 0.01)
sin_t = np.sin(t)
train_data = np.array([t, sin_t]).T
... | /content/code_sandbox/tests/test_dynamic_movement_primitives.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 409 |
```python
import conftest
from Control.inverted_pendulum import inverted_pendulum_mpc_control as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_inverted_pendulum_mpc_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 57 |
```python
import numpy as np
import conftest # Add root path to sys.path
from PathPlanning.ReedsSheppPath import reeds_shepp_path_planning as m
def check_edge_condition(px, py, pyaw, start_x, start_y, start_yaw, end_x,
end_y, end_yaw):
assert (abs(px[0] - start_x) <= 0.01)
assert (a... | /content/code_sandbox/tests/test_reeds_shepp_path_planning.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 591 |
```python
import conftest
from PathPlanning.AStar import a_star_searching_from_two_side as m
def test1():
m.show_animation = False
m.main(800)
def test2():
m.show_animation = False
m.main(5000) # increase obstacle number, block path
if __name__ == '__main__':
conftest.run_this_test(__file__)
... | /content/code_sandbox/tests/test_a_star_searching_two_side.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 84 |
```python
import conftest # Add root path to sys.path
from PathTracking.lqr_speed_steer_control import lqr_speed_steer_control as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_lqr_speed_steer_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 67 |
```python
import conftest # Add root path to sys.path
from PathTracking.rear_wheel_feedback import rear_wheel_feedback as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_rear_wheel_feedback.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 61 |
```python
import conftest
from PathPlanning.ClothoidPath import clothoid_path_planner as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_clothoidal_paths.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 56 |
```python
import conftest
from Mapping.circle_fitting import circle_fitting as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_circle_fitting.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 52 |
```python
import conftest # Add root path to sys.path
from PathPlanning.RRTDubins import rrt_dubins as m
def test1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_rrt_dubins.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 63 |
```python
import conftest
from Bipedal.bipedal_planner import bipedal_planner as m
def test_1():
bipedal_planner = m.BipedalPlanner()
footsteps = [[0.0, 0.2, 0.0],
[0.3, 0.2, 0.0],
[0.3, 0.2, 0.2],
[0.3, 0.2, 0.2],
[0.0, 0.2, 0.2]]
biped... | /content/code_sandbox/tests/test_bipedal_planner.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 167 |
```python
import conftest
from PathPlanning.AStar import a_star as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_a_star.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 51 |
```python
import random
import conftest
from PathPlanning.BatchInformedRRTStar import batch_informed_rrtstar as m
def test_1():
m.show_animation = False
random.seed(12345)
m.main(maxIter=10)
if __name__ == '__main__':
conftest.run_this_test(__file__)
``` | /content/code_sandbox/tests/test_batch_informed_rrt_star.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 73 |
```python
"""
Diff code style checker with ruff
This code come from:
path_to_url
Scipy's licence: path_to_url
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must ret... | /content/code_sandbox/tests/test_codestyle.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 952 |
```python
"""
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 as np
from utils.plot import plot_covariance_ellipse
# Covar... | /content/code_sandbox/Localization/extended_kalman_filter/extended_kalman_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,502 |
```python
"""
Ensemble Kalman Filter(EnKF) localization sample
author: Ryohei Sasaki(rsasaki0109)
Ref:
Ensemble Kalman filtering
(path_to_url
"""
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.ang... | /content/code_sandbox/Localization/ensemble_kalman_filter/ensemble_kalman_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,251 |
```python
"""
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.parent.parent))
import math
import matplotlib.pyplot as plt
import n... | /content/code_sandbox/Localization/extended_kalman_filter/ekf_with_velocity_correction.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,852 |
```python
"""
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 numpy as np
import scipy.linalg
from utils.angle import rot_mat_2... | /content/code_sandbox/Localization/unscented_kalman_filter/unscented_kalman_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,133 |
```python
"""
Cubature Kalman filter using Constant Turn Rate and Velocity (CTRV) model
Fuse sensor data from IMU and GPS to obtain accurate position
path_to_url
Author: Raghuram Shankar
state matrix: 2D x-y position, yaw, velocity and yaw rate
measurement matrix: 2D x-y positio... | /content/code_sandbox/Localization/cubature_kalman_filter/cubature_kalman_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,708 |
```python
"""
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
import numpy as np
from scipy.ndimage import gaussia... | /content/code_sandbox/Localization/histogram_filter/histogram_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,064 |
```python
"""
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 import rot_mat_2d
# Estimation parameter of PF
Q =... | /content/code_sandbox/Localization/particle_filter/particle_filter.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,286 |
```python
"""
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 VehicleSimulator:
def __init__(self, i_x, i_y, ... | /content/code_sandbox/Mapping/rectangle_fitting/simulator.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,106 |
```python
import sys
import pathlib
sys.path.append(str(pathlib.Path(__file__).parent))
``` | /content/code_sandbox/Mapping/rectangle_fitting/__init_.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 19 |
```python
"""
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
path_to_url
your_sha256_hashners/
"""
import sys
import pathlib
sys.path.append(str(pathli... | /content/code_sandbox/Mapping/rectangle_fitting/rectangle_fitting.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,527 |
```python
"""
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_gaussian_grid_map(ox, oy, xyreso, std):
minx,... | /content/code_sandbox/Mapping/gaussian_grid_map/gaussian_grid_map.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 784 |
```python
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
Parameters
----------
p1 : np.array
3D point
p... | /content/code_sandbox/Mapping/normal_vector_estimation/normal_vector_estimation.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,503 |
```python
"""
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) - EXTEND_AREA / 2.0)
miny = round(min(oy) - EXTEND... | /content/code_sandbox/Mapping/raycasting_grid_map/raycasting_grid_map.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,138 |
```python
"""
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):
clusters = Clusters(rx, ry, nc)
clusters.cal... | /content/code_sandbox/Mapping/kmeans_clustering/kmeans_clustering.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,023 |
```python
"""
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_data(self):
return self.data
... | /content/code_sandbox/Mapping/grid_map_lib/grid_map_lib.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,505 |
```python
"""
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
input: point x-y positions
... | /content/code_sandbox/Mapping/circle_fitting/circle_fitting.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,170 |
```python
"""
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:
"""
Normal Distribution Transform ... | /content/code_sandbox/Mapping/ndt_map/ndt_map.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,145 |
```python
"""
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 LIDAR laser beams (angles and corresponding dista... | /content/code_sandbox/Mapping/lidar_to_grid_map/lidar_to_grid_map.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,502 |
```python
"""
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_plot = True
def voxel_point_sampling(original_points:... | /content/code_sandbox/Mapping/point_cloud_sampling/point_cloud_sampling.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,278 |
```python
"""
Class for plotting a quadrotor
Author: Daniel Ingram (daniel-s-ingram)
"""
from math import cos, sin
import numpy as np
import matplotlib.pyplot as plt
class Quadrotor():
def __init__(self, x=0, y=0, z=0, roll=0, pitch=0, yaw=0, size=0.25, show_animation=True):
self.p1 = np.array([size / 2,... | /content/code_sandbox/AerialNavigation/drone_3d_trajectory_following/Quadrotor.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 897 |
```python
"""
Simulate a quadrotor following a 3D trajectory
Author: Daniel Ingram (daniel-s-ingram)
"""
from math import cos, sin
import numpy as np
from Quadrotor import Quadrotor
from TrajectoryGenerator import TrajectoryGenerator
show_animation = True
# Simulation parameters
g = 9.81
m = 0.2
Ixx = 1
Iyy = 1
Izz... | /content/code_sandbox/AerialNavigation/drone_3d_trajectory_following/drone_3d_trajectory_following.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,701 |
```python
"""
Generates a quintic polynomial trajectory.
Author: Daniel Ingram (daniel-s-ingram)
"""
import numpy as np
class TrajectoryGenerator():
def __init__(self, start_pos, des_pos, T, start_vel=[0,0,0], des_vel=[0,0,0], start_acc=[0,0,0], des_acc=[0,0,0]):
self.start_x = start_pos[0]
self.... | /content/code_sandbox/AerialNavigation/drone_3d_trajectory_following/TrajectoryGenerator.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 627 |
```python
"""
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.mplot3d.art3d as art3d
class BipedalPlanner(obj... | /content/code_sandbox/Bipedal/bipedal_planner/bipedal_planner.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,037 |
```python
"""
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
"""
import matplotlib.pyplot as plt
import numpy as... | /content/code_sandbox/Control/move_to_pose/move_to_pose_robot.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,813 |
```python
"""
A rocket powered landing with successive convexification
author: Sven Niederberger
Atsushi Sakai
Ref:
- Python implementation of 'Successive Convexification for 6-DoF Mars Rocket Powered Landing with Free-Final-Time' paper
by Michael Szmuk and Behcet Ackmese.
- EmbersArc/SuccessiveConvexificat... | /content/code_sandbox/AerialNavigation/rocket_powered_landing/rocket_powered_landing.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 8,366 |
```python
"""
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 = 1.0 # [kg]
m = 0.3 # [kg]
g = 9.8 # [m/s^2]
nx = 4 ... | /content/code_sandbox/Control/inverted_pendulum/inverted_pendulum_lqr_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,497 |
```python
"""
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 plt
import numpy as np
from random im... | /content/code_sandbox/Control/move_to_pose/move_to_pose.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,628 |
```python
"""
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]
nx = 4 # number of state
nu = 1 # number of input
Q = np... | /content/code_sandbox/Control/inverted_pendulum/inverted_pendulum_mpc_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,491 |
```python
import numpy as np
from scipy.spatial.transform import Rotation as Rot
def rot_mat_2d(angle):
"""
Create 2D rotation matrix from an angle
Parameters
----------
angle :
Returns
-------
A 2D rotation matrix
Examples
--------
>>> angle_mod(-4.0)
"""
retu... | /content/code_sandbox/utils/angle.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 479 |
```python
"""
Matplotlib based plotting utilities
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import art3d
from matplotlib.patches import FancyArrowPatch
from mpl_toolkits.mplot3d.proj3d import proj_transform
from mpl_toolkits.mplot3d import Axes3D
from utils.angle impo... | /content/code_sandbox/utils/plot.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,505 |
```python
"""
Extended Kalman Filter SLAM example
author: Atsushi Sakai (@Atsushi_twi)
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from utils.angle import angle_mod
# EKF state covariance
Cx = np.diag([0.5, 0.5, np.deg2rad(30.0)]) ** 2
# Simulation parameter
Q_sim = np.diag([0.2, np.deg2rad... | /content/code_sandbox/SLAM/EKFSLAM/ekf_slam.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,423 |
```python
"""
Graph based SLAM example
author: Atsushi Sakai (@Atsushi_twi)
Ref
[A Tutorial on Graph-Based SLAM]
(path_to_url~stachnis/pdf/grisetti10titsmag.pdf)
"""
import sys
import pathlib
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
import copy
import itertools
import math
import matplot... | /content/code_sandbox/SLAM/GraphBasedSLAM/graph_based_slam.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,809 |
```python
"""
FastSLAM 2.0 example
author: Atsushi Sakai (@Atsushi_twi)
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from utils.angle import angle_mod
# Fast SLAM covariance
Q = np.diag([3.0, np.deg2rad(10.0)]) ** 2
R = np.diag([1.0, np.deg2rad(20.0)]) ** 2
# Simulation parameter
Q_SIM = n... | /content/code_sandbox/SLAM/FastSLAM2/fast_slam2.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 3,740 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
"""Functions for loading graphs.
"""
import logging
import numpy as np
from .edge.edge_odometry import EdgeOdometry
from .graph import Graph
from .pose.se2 import PoseSE2
from .util import upper_triangular_matrix_to_full_matrix
from... | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/load.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 382 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
"""Graph SLAM solver in Python.
"""
``` | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/__init__.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 31 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
"""Utility functions used throughout the package.
"""
import numpy as np
TWO_PI = 2 * np.pi
def neg_pi_to_pi(angle):
r"""Normalize ``angle`` to be in :math:`[-\pi, \pi)`.
Parameters
----------
angle : float
... | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/util.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 405 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
r"""A ``Graph`` class that stores the edges and vertices required for Graph SLAM.
"""
import warnings
from collections import defaultdict
from functools import reduce
import matplotlib.pyplot as plt
import numpy as np
from scipy.spar... | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/graph.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,225 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
"""A ``Vertex`` class.
"""
import matplotlib.pyplot as plt
# pylint: disable=too-few-public-methods
class Vertex:
"""A class for representing a vertex in Graph SLAM.
Parameters
----------
vertex_id : int
The... | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/vertex.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 404 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
``` | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/pose/__init__.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 22 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
r"""Representation of a pose in :math:`SE(2)`.
"""
import math
import numpy as np
from ..util import neg_pi_to_pi
class PoseSE2(np.ndarray):
r"""A representation of a pose in :math:`SE(2)`.
Parameters
----------
po... | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/pose/se2.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,076 |
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
r"""A class for odometry edges.
"""
import numpy as np
import matplotlib.pyplot as plt
#: The difference that will be used for numerical differentiation
EPSILON = 1e-6
class EdgeOdometry:
r"""A class for representing odometry... | /content/code_sandbox/SLAM/GraphBasedSLAM/graphslam/edge/edge_odometry.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,305 |
```python
"""
FastSLAM 1.0 example
author: Atsushi Sakai (@Atsushi_twi)
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from utils.angle import angle_mod
# Fast SLAM covariance
Q = np.diag([3.0, np.deg2rad(10.0)]) ** 2
R = np.diag([1.0, np.deg2rad(20.0)]) ** 2
# Simulation parameter
Q_SIM = n... | /content/code_sandbox/SLAM/FastSLAM1/fast_slam1.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 3,405 |
```python
"""
Iterative Closest Point (ICP) SLAM example
author: Atsushi Sakai (@Atsushi_twi), Gktu Karakal, Shamil Gemuev
"""
import math
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
import matplotlib.pyplot as plt
import numpy as np
# ICP parameters
EPS = 0.0001
MAX_ITER = 100
show_animati... | /content/code_sandbox/SLAM/iterative_closest_point/iterative_closest_point.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,706 |
```python
"""
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 gain
Lfc = 2.0 # [m] look-ahead distance
Kp... | /content/code_sandbox/PathTracking/pure_pursuit/pure_pursuit.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 1,678 |
```python
"""
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 import angle_mod
sys.path.append(str(pathlib.Path(__file_... | /content/code_sandbox/PathTracking/lqr_steer_control/lqr_steer_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 2,207 |
```python
"""
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 math
import numpy as np
import sys
import pathlib
sys.path.append(str(pathlib.Path(__file__).paren... | /content/code_sandbox/PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py | python | 2016-03-21T09:34:43 | 2024-08-16T19:00:08 | PythonRobotics | AtsushiSakai/PythonRobotics | 22,516 | 5,805 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.