Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

joint_robot with inter_robot_collision #1

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
969483a
playing around with auto yaml/json conversion
quimortiz Jul 22, 2023
1395920
fake cli parser with json
quimortiz Jul 22, 2023
915009e
minor
quimortiz Jul 22, 2023
0dbf2b5
dev
quimortiz Jul 26, 2023
fa8d47e
add dev to ci
quimortiz Jul 26, 2023
7bc3e4f
update
quimortiz Jul 26, 2023
65fd1d0
update for refactor of removing ompl dependency from our planners
quimortiz Jul 27, 2023
288ccac
Merge remote-tracking branch 'origin/json' into dev
quimortiz Jul 27, 2023
f2a5a23
new pics of motions
quimortiz Jul 27, 2023
258b97e
Update README.md
quimortiz Jul 27, 2023
d6d4a7d
quad3d
quimortiz Jul 27, 2023
2698bf2
Merge branch 'dev' of github.com:quimortiz/dynobench into dev
quimortiz Jul 27, 2023
a894087
Update README.md
quimortiz Jul 27, 2023
5598381
Update README.md
quimortiz Jul 27, 2023
043b2d8
Update README.md
quimortiz Jul 27, 2023
1407368
Update README.md
quimortiz Jul 27, 2023
c8c5964
Update README.md
quimortiz Jul 27, 2023
8001d98
update for backup before filling with trajectories
quimortiz Jul 28, 2023
343a019
Merge branch 'dev' of github.com:quimortiz/dynobench into dev
quimortiz Jul 28, 2023
a58b490
add example trajectories for each problem
quimortiz Jul 28, 2023
3f86ffb
continue on error on ci
quimortiz Jul 28, 2023
206a55f
minor
quimortiz Jul 28, 2023
63380c1
update on models
quimortiz Jul 30, 2023
4058b5f
trying to make dbastar faster
quimortiz Jul 30, 2023
6dfdef7
option to get last state of rollout, to accelerate checking if prmitive
quimortiz Jul 31, 2023
f95de89
Update README.md
quimortiz Jul 31, 2023
73a3af9
Update README.md
quimortiz Jul 31, 2023
ef498e1
Merge branch 'main' of github.com:quimortiz/dynobench into main
quimortiz Jul 31, 2023
487b80b
Merge pull request #1 from quimortiz/dev
quimortiz Jul 31, 2023
6d94474
joint_robot with inter_robot_collision
akmaralAW Aug 8, 2023
194b4ba
fixed bug with conflicts
akmaralAW Aug 8, 2023
ce9a177
fix compiler warning
whoenig Aug 14, 2023
edcf5ab
two change to allow for sum of cost optimization
quimortiz Aug 15, 2023
b917b71
add integator1_2d, and minors fixes on integrator2_2d
quimortiz Aug 16, 2023
3008541
Merge remote-tracking branch 'refs/remotes/origin/main' into main
quimortiz Aug 16, 2023
26e4fd3
add integator1_2d, and minors fixes on integrator2_2d (CHERRY PICK)
quimortiz Aug 16, 2023
fdfc8b1
additional changes to get cherry pick working
quimortiz Aug 16, 2023
d656d0c
generalizable joint_robot
akmaralAW Aug 17, 2023
4389a78
Merge pull request #2 from IMRCLab/quim-db-CBS
akmaralAW Aug 18, 2023
865ae7c
Merge branch 'joint_robot' of github.com:IMRCLab/dynobench into joint…
akmaralAW Aug 18, 2023
37bbbc9
hybrid joint robot
akmaralAW Aug 18, 2023
82020b9
remove unnecessary arguments in join robot
quimortiz Aug 21, 2023
3ad82db
add option to get nxs for joint robot
quimortiz Aug 22, 2023
aa24ddd
update bug collisions joint robot trailer
quimortiz Aug 22, 2023
db13570
spherical unicycle for s2m2
akmaralAW Aug 28, 2023
66570b2
match ompl_planner and joint_robot params for double_integrator
akmaralAW Aug 28, 2023
a459d8d
Merge pull request #3 from IMRCLab/double_integrator_checker
akmaralAW Aug 28, 2023
d19d51c
add unicycle_2nd
akmaralAW Sep 1, 2023
8306e3d
fix the bug with xweightb for mrs
akmaralAW Sep 1, 2023
9c3f059
rm comment - fake
akmaralAW Sep 1, 2023
927c3a5
Revert "rm comment - fake"
akmaralAW Sep 1, 2023
4d82b4d
Merge pull request #5 from IMRCLab/2_nd_order_unicycle
akmaralAW Sep 1, 2023
3ce0506
double_integrator for demo
akmaralAW Sep 4, 2023
cb71462
double_integrator_rad = 0.15
akmaralAW Sep 5, 2023
ba5d08b
unicycle_sphere: change ang_vel bounds
whoenig Sep 5, 2023
22f942e
add workspace boundary
akmaralAW Sep 8, 2023
4743fd0
positon bound size bug
akmaralAW Sep 8, 2023
9923cf1
joint_robot with Quim functions
akmaralAW Oct 19, 2023
65cbccd
Merge pull request #6 from IMRCLab/merge_joint_robots
akmaralAW Oct 19, 2023
3fe0cbc
unicycle_sphere into dynobench
akmaralAW Oct 23, 2023
8d0d87b
unicycle1 with radius
akmaralAW Oct 24, 2023
b928c23
rm joint_robot params
akmaralAW Oct 24, 2023
5b17b95
Merge branch 'main' into joint_robot
akmaralAW Oct 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CMake

on:
push:
branches: [ "main" ]
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "dev" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down Expand Up @@ -47,17 +47,20 @@ jobs:

- name: Test Python Bindings
working-directory: ${{github.workspace}}/build
continue-on-error: true
run: |
python ../example/test_robot.py

- name: Test Python Viewer
continue-on-error: true
#NOTE: To see the robots in your computer use:
#VISUALIZE=1 python3 ../utils/viewer/viewer_test.py
working-directory: ${{github.workspace}}/build
run: |
python3 ../utils/viewer/viewer_test.py

- name: Test c++
continue-on-error: true
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "deps/pybind11"]
path = deps/pybind11
url = https://github.com/pybind/pybind11
[submodule "deps/json"]
path = deps/json
url = https://github.com/nlohmann/json
95 changes: 45 additions & 50 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ project(
LANGUAGES CXX)

# find_package(pinocchio REQUIRED)
find_package(Boost REQUIRED COMPONENTS program_options serialization)
find_package(Boost REQUIRED COMPONENTS program_options serialization stacktrace_basic)
find_package(fcl REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(Eigen3 REQUIRED)
# find_package(pybind11 REQUIRED)

add_subdirectory(deps/pybind11)
add_subdirectory(deps/json)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED On)
Expand All @@ -34,7 +35,9 @@ add_library(
./src/planar_rotor.cpp
./src/planar_rotor_pole.cpp
./src/car2.cpp
./src/integrator2_2d.cpp)
./src/integrator2_2d.cpp
./src/joint_robot.cpp
./src/integrator1_2d.cpp)

add_library(dynobench::dynobench ALIAS dynobench)

Expand All @@ -52,65 +55,57 @@ target_include_directories(

target_compile_options(dynobench PRIVATE -Wall -Wextra)

target_link_libraries(dynobench PUBLIC fcl yaml-cpp Boost::program_options
Boost::serialization)
target_link_libraries(
dynobench
PUBLIC fcl yaml-cpp Boost::program_options Boost::serialization Boost::stacktrace_basic ${CMAKE_DL_LIBS}
PUBLIC nlohmann_json::nlohmann_json)

target_link_libraries(
check_trajectory
PUBLIC dynobench
PRIVATE fcl yaml-cpp Boost::program_options Boost::serialization)

# Installation instructions

target_link_libraries(robot_python PUBLIC Eigen3::Eigen dynobench fcl)

include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/dynobench)

install(
TARGETS dynobench
EXPORT dynobench-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

# Export the targets to a script
install(
EXPORT dynobench-targets
FILE dynobenchTargets.cmake
NAMESPACE dynobench::
DESTINATION ${INSTALL_CONFIGDIR})

# Create a ConfigVersion.cmake file
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion)

configure_package_config_file(
${CMAKE_CURRENT_LIST_DIR}/cmake/dynobenchConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfig.cmake
INSTALL_DESTINATION ${INSTALL_CONFIGDIR})

# Install the config, configversion and custom find modules
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfigVersion.cmake
DESTINATION ${INSTALL_CONFIGDIR})
# Installation instructions

#
# include(GNUInstallDirs) set(INSTALL_CONFIGDIR
# ${CMAKE_INSTALL_LIBDIR}/cmake/dynobench)
#
# install( TARGETS dynobench EXPORT dynobench-targets LIBRARY DESTINATION
# ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
#
# install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
#
# # Export the targets to a script install( EXPORT dynobench-targets FILE
# dynobenchTargets.cmake NAMESPACE dynobench:: DESTINATION ${INSTALL_CONFIGDIR})
#
# # Create a ConfigVersion.cmake file include(CMakePackageConfigHelpers)
# write_basic_package_version_file(
# ${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfigVersion.cmake VERSION
# ${PROJECT_VERSION} COMPATIBILITY AnyNewerVersion)
#
# configure_package_config_file(
# ${CMAKE_CURRENT_LIST_DIR}/cmake/dynobenchConfig.cmake.in
# ${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfig.cmake INSTALL_DESTINATION
# ${INSTALL_CONFIGDIR})
#
# # Install the config, configversion and custom find modules install(FILES
# ${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfig.cmake
# ${CMAKE_CURRENT_BINARY_DIR}/dynobenchConfigVersion.cmake DESTINATION
# ${INSTALL_CONFIGDIR})
#
# #
# ##############################################################################
# Exporting from the build tree
# configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/FindRapidJSON.cmake
# # Exporting from the build tree #
# configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/FindRapidJSON.cmake #
# ${CMAKE_CURRENT_BINARY_DIR}/FindRapidJSON.cmake COPYONLY)

export(
EXPORT dynobench-targets
FILE ${CMAKE_CURRENT_BINARY_DIR}/dynobenchTargets.cmake
NAMESPACE dynobench::)

# Register package in the User Package Registry
export(PACKAGE dynobench)
#
# export( EXPORT dynobench-targets FILE
# ${CMAKE_CURRENT_BINARY_DIR}/dynobenchTargets.cmake NAMESPACE dynobench::)
#
# # Register package in the User Package Registry export(PACKAGE dynobench)



Expand Down
100 changes: 89 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,42 @@ Dynobench 🦖 is a universal benchmark for kinodynamic motion planning. Develop
<img src="assets/dynobench.png" width=50% height=50%>
</p >


You will find multiple planners in [Dynoplan](https://github.com/quimortiz/dynoplan) 🦖

## Robots and Problem Description

TODO

## Motion Primitives


Acrobot
<p align="center">
<img src="assets/motions/primitives-acrobot.png" width=50% height=auto>
</p >

Planar Rotor
<p align="center">
<img src="assets/motions/primitives-quad2d.png" width=50% height=auto>
</p >

Planar Rotor Pole
<p align="center">
<img src="assets/motions/primitives-quad2dpole.png" width=50% height=auto>
</p >

Quadrotor
<p align="center">
<img src="assets/motions/primitives-quad3d.png" width=50% height=auto>
</p >

Unicycle1
<p align="center">
<img src="assets/motions/primitives-unicycle1.png" width=50% height=auto>
</p >


# Using Dynobench

### Submodule
Expand All @@ -23,7 +57,7 @@ Using `cmake`, import the library with:
```cmake
add_subdirectory(dynobench EXCLUDE_FROM_ALL) # use EXCLUDE_FROM_ALL to avoid
# building the tests
...cmake
...
target_link_libraries(
my_target
PRIVATE dynobench::dynobench )
Expand Down Expand Up @@ -99,12 +133,12 @@ target_link_libraries(main PRIVATE dynobench::dynobench yaml-cpp)
### Python Viewer

Check the viewers with:
```
```bash
python3 ../utils/viewer/viewer_test.py
```
and

```
```bash
VISUALIZE=1 python3 ../utils/viewer/viewer_test.py
```

Expand All @@ -131,10 +165,8 @@ In this short tutorial, we summarize the steps we followed to add the model

`Integrator2_2d` is a double integrator in 2d:

State: $\mathbf{x} = [x,y, \dot{x}, \dot{y}]$
Control: $\mathbf{u} = [\ddot{x} , \ddot{y}]$
Second order dynamics: $\frac{d}{d t}[ \dot{x}, \dot{y} ] = \mathbf{u}$
Step function $\mathbf{x}_{k+1} = A \mathbf{x} + B \mathbf{u} $
The state is $\mathbf{x} = [x,y, \dot{x}, \dot{y}]$, control is $\mathbf{u} = [\ddot{x} , \ddot{y}]$.
Second order dynamics are $\frac{d}{d t}[ \dot{x}, \dot{y} ] = \mathbf{u}$. Thus, the step function is $\mathbf{x}_{k+1} = A \mathbf{x} + B \mathbf{u} $
with:

```math
Expand All @@ -155,12 +187,10 @@ B =
\end{bmatrix}
```

Control Bounds: $|u_x| \leq 1$, $|u_y| \leq 1$

State Bounds: $|\dot{x}| \leq 1 $, $|\dot{y}| \leq 1 $
Control Bounds are $|u_x| \leq 1$, $|u_y| \leq 1$, and state bounds on velocity $|\dot{x}| \leq 1 $, $|\dot{y}| \leq 1 $.

First, we have implemented a new class in `src/integrator2_2d.cpp` and `include/dynobench/integrator2_2d.hpp`. We store all parameters in a separate class, `Integrator2_2d_params`.
A robot model implements 4 big functionalities: distance and cost bounds between states, a dynamics function, bounds on state and control, and collision . Check the code!
A robot model implements 4 main functionalities: distance and cost bounds between states, a dynamics function, bounds on state and control, and collision against obstacles. Check the code!

```cpp
// dynobench/double_integrator_2d.hpp and src/double_integrator_2d.hpp
Expand Down Expand Up @@ -228,6 +258,7 @@ class Robot :

class Integrator2_2dViewer (RobotViewer):
```

`RobotViewer` is a base class that provides default functionality. `Robot` is the class that draws the robot (e.g. using a rectangle )


Expand Down Expand Up @@ -282,6 +313,53 @@ The planners in Dynoplan that depend on OMPL require to implement a small wrappe



## More Motion Primitives

You will find a small set of motion primitives for each system in [dynobench](https://github.com/quimortiz/dynobench).

A large set of primitives for each system can be downloaded from Google Drive. This can be done manually with a web browser or using the command line with [gdown](https://github.com/wkentaro/gdown). For example:

```bash
gdown --fuzzy "https://drive.google.com/file/d/1r_ecGwdfvWnVWxPsvR4d8Hjcayxg5PsB/view?usp=drive_link"
```

All primitive in two ZIP files: https://drive.google.com/drive/folders/1-Nvctva17I8aFsWvHfdQFWTIDUNWwgcM?usp=drive_link

Primitves per system:

* unicycle1_v0
https://drive.google.com/file/d/15dXqC_OdrI8KjaHRNakYgk9IXLtTeMtt/view?usp=drive_link

* quadrotor_v1 (OMPL-style)
https://drive.google.com/file/d/1r_ecGwdfvWnVWxPsvR4d8Hjcayxg5PsB/view?usp=drive_link

* quadrotor_v0
https://drive.google.com/file/d/1j57kwE5hFgO-46LjStv_zqm6S5BFUsY8/view?usp=drive_link

* Acrobot_v0
https://drive.google.com/file/d/1mLiTgcpXSI9UHHss4Qt7AIsRwJPbPC2H/view?usp=drive_link

* Roto_Pole_v0
https://drive.google.com/file/d/1KMb4IDgucHN8uWI9YN_W07AhX59tkph_/view?usp=drive_link

* Planar Rotor_v0
https://drive.google.com/file/d/18kI3qXweA4RgvDxtV3vfxnfc_BhX52j8/view?usp=drive_link

* Car1_v0
https://drive.google.com/file/d/1TPX3c8RvMOy9hiaKL-kUE8M61OknDrDK/view?usp=drive_link

* Unicycle 2 _v0
https://drive.google.com/file/d/1PoK1kbiLRFq_hkv3pVWU0csNr4hap0WX/view?usp=drive_link

* Unicycle 1 v2
https://drive.google.com/file/d/1IvwN-e1jn5P0P1ILaVwSrUnIeBlFxhHI/view?usp=drive_link

* Unicycle 1 v1
https://drive.google.com/file/d/1OLuw5XICTueoZuleXOuD6vNh3PCWfHif/view?usp=drive_link




## Roadmap

Dynobench is still in an alpha stage.
Expand Down
Binary file added assets/motions/primitives-acrobot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/motions/primitives-quad2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/motions/primitives-quad2dpole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/motions/primitives-quad3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/motions/primitives-unicycle1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions deps/json
Submodule json added at 5d2754
Binary file not shown.
Loading