Package: sbp-env
Sampling-Based Motion Planners' Testing EnvironmentSampling-based motion planners' testing environment (sbp-env) is a full feature framework to quickly test different sampling-based algorithms for motion planning.sbp-envfocuses on the flexibility of tinkering with different aspects of the framework, and had divided the main planning components into two categories (i)samplersand (ii)planners.The focus ofmotion planning researchhad been mainly on (i) improving the sampling efficiency (with methods such as heuristic or learned distribution) and (ii) the algorithmic aspect of the planner using different routines to build a connected graph. Therefore, by separating the two components one can quickly swap out different components to test novel ideas.Have a look at thedocumentationsfor more detail information. If you are looking for the previous code for the RRdT* paper it is now archived atsoraxas/rrdt.Quick start with custom arbitrary environmentspipinstallsbp-envimportsbp_envfrommathimportexp,sin,cosforfunctorin[# simple inequalitylambdax:(x[1]<x[0]+1)and(x[1]>x[0]-1),# equation adopted from https://au.mathworks.com/help/matlab/ref/peaks.htmllambdax:0<(3*(1-x[0])**2.0*exp(-(x[0]**2)-(x[1]+1)**2)-10*(x[0]/5-x[0]**3-x[1]**5)*exp(-x[0]**2-x[1]**2)-1/3*exp(-((x[0]+1)**2)-x[1]**2)),lambdax:-0.22<(cos(x[0])*sin(x[1])),lambdax:0.05<(cos(x[0]**2+x[1]**2)),]:engine=sbp_env.engine.BlackBoxEngine(collision_checking_functor=functor,lower_limits=[-5,-5],upper_limits=[5,5],cc_epsilon=0.1,# collision check resolution)planning_args=sbp_env.generate_args(planner_id="rrt",engine=engine,start_pt=[-3,-3],goal_pt=[3,3],display=True,first_solution=True,)env=sbp_env.env.Env(args=planning_args)env.run()print(env.get_solution_path(as_array=True))InstallationOptionalI recommend first create a virtual environment with# assumes python3 and bash shellpython-mvenvsbp_envsourcesbp_env/bin/activateInstall dependenciesYou can install all the needed packages with pip.pipinstall-rrequirements.txtThere is also an optional dependency onklamptif you want to use the 3D simulator. Refer to itsinstallation guidefor details.Quick GuideYou can get a detailed help message withpythonmain.py--helpbut the basic syntax ispythonmain.py<PLANNER><MAP>[options]It will open a new window that display a map on it. Every white pixel is assumed to be free, and non-white pixels are obstacles. You will need to use your mouse to select two points on the map, the first will be set as the starting point and the second as the goal point.DemosRun maps with different available PlannersThis repository contains a framework to performs quick experiments for Sampling-Based Planners (SBPs) that are implemented in Python. The followings are planners that had implemented and experimented in this framework.Note that the commands shown in the respective demos can be customised with additional options. In fact, the actual command format used for the demonstrations ispythonmain.py<PLANNER>maps/room1.pngstart<sx>,<sy>goal<sx>,<sy>-vvto have a fix set of starting and goal points for consistent visualisation, but we omitted the start/goal options in the following commands for clarity.RRdT*pythonmain.pyrrdtmaps/room1.png-vvRRT*pythonmain.pyrrtmaps/room1.png-vvBi-RRT*pythonmain.pybirrtmaps/room1.png-vvInformed RRT*pythonmain.pyinformedrrtmaps/room1.png-vvThe red ellipse shown is the dynamic sampling area for Informed RRT*OthersThere are also some other planners included in this repository. Some are preliminary planner that inspired RRdT*, some are planners with preliminary ideas, and some are useful for debugging.Reference to this repositoryYou can use the following citation if you use this repository for your research@article{lai2021SbpEnv,doi={10.21105/joss.03782},url={https://doi.org/10.21105/joss.03782},year={2021},publisher={The Open Journal},volume={6},number={66},pages={3782},author={Tin Lai},title={sbp-env: A Python Package for Sampling-based Motion Planner and Samplers},journal={Journal of Open Source Software}}