Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
Language: Cpp
BasedOnStyle: Google

AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AllowAllParametersOfDeclarationOnNextLine: true
# Do NOT force it always
AlwaysBreakAfterReturnType: None
AlignOperands: DontAlign
BraceWrapping:
AfterClass: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 100
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
DerivePointerAlignment: false
PointerAlignment: Middle
# Make it "cheap" to put the return type on its own line when needed
PenaltyReturnTypeOnItsOwnLine: 50 # try 10–50
ReflowComments: false
IncludeBlocks: Preserve
...
41 changes: 41 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Checks: >
# Disable all checks by default to explicitly enable those you want
-*,

# Bug Prone Checks: Focus on potential bugs and common mistakes
bugprone-*,

# Modernize Checks: Suggest modern C++ features and idioms
modernize-*,

# Performance Checks: Identify potential performance pitfalls
performance-*,

# Readability Checks: Improve code readability and maintainability
readability-*,

# Specific exceptions or stricter rules
-modernize-use-trailing-return-type, # Often generates noisy suggestions

# NOTE: These slow checks are disabled for pre-commit speed.
# Consider running them in CI:
# - clang-analyzer-* (deep dataflow analysis)
# - cppcoreguidelines-* (many checks, some overlap)
# - misc-*

WarningsAsErrors: >
bugprone-*,

HeaderFilterRegex: '^((?!/opt/ros|/usr/include).)*$'

# AnalyzeTemporaryDtors: true
# Disabled for speed. Enable in CI for thorough analysis.

FormatStyle: file
# Integrate with .clang-format to ensure consistent formatting options.

CheckOptions:
# bugprone-argument-comment.StrictMode: 1
# readability-function-size.StatementThreshold: 800
# google-readability-braces-around-statements.ShortStatementLines: 1
# cert-str34-c.Strip: 'printf,sprintf,log'
2 changes: 0 additions & 2 deletions .github/workflows/rolling_ros2_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
CCACHE_DIR: "${{ github.workspace }}/.ccache" # directory for ccache (and how we enable ccache in industrial_ci)
steps:
- uses: actions/checkout@v4 # clone target repository
with:
ref: rolling
- uses: actions/cache@v4 # fetch/store the directory used by ccache before/after the ci run
with:
path: ${{ env.CCACHE_DIR }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ src/franka_description
src/franka_ros2
src/libfranka
MUJOCO_LOG.TXT
src/crisp_controllers.egg-info
tmp
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-added-large-files
args:
- --maxkb=2048
- id: check-merge-conflict
- repo: https://github.com/gitleaks/gitleaks
rev: v8.28.0
hooks:
- id: gitleaks

# CPP hooks
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.8
hooks:
- id: clang-format
types_or: [c++, c, cuda]

- repo: local
hooks:
- id: clang-tidy
name: clang-tidy
description: C++ code analysis tool
language: system
types_or: [c++, c, cuda]
always_run: false
pass_filenames: true
entry: bash -c
args:
- |
# If pre-commit passed no files, do nothing (success).
if [ "$#" -eq 0 ]; then
exit 0
fi
# Find compile_commands.json by searching up from current directory
d="$PWD"
while [ "$d" != "/" ]; do
if [ -f "$d/build/compile_commands.json" ]; then
# Run clang-tidy and ignore PCH-related errors
clang-tidy -p "$d/build" "$@" 2>&1 | grep -v "is not a valid precompiled PCH file" | grep -v "is not a PCH file:" || true
exit 0
fi
d="$(dirname "$d")"
done
echo "Error: compile_commands.json not found. Build the project first." >&2
exit 1
- --

1 change: 0 additions & 1 deletion .python-version

This file was deleted.

8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(crisp_controllers)

find_program(CCACHE_PROGRAM ccache)
Expand Down Expand Up @@ -63,8 +63,8 @@ find_package(realtime_tools REQUIRED)
find_package(generate_parameter_library REQUIRED)

generate_parameter_library(
cartesian_impedance_controller_parameters
src/cartesian_impedance_controller.yaml
cartesian_controller_parameters
src/cartesian_controller.yaml
)

generate_parameter_library(
Expand Down Expand Up @@ -112,7 +112,7 @@ endif()
# Link parameter libraries to the main library
target_link_libraries(${PROJECT_NAME}
PRIVATE
cartesian_impedance_controller_parameters
cartesian_controller_parameters
pose_broadcaster_parameters
torque_feedback_controller_parameters
twist_broadcaster_parameters
Expand Down
10 changes: 0 additions & 10 deletions Doxyfile

This file was deleted.

13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

CRISP is a collection of real-time, C++ controllers for compliant torque-based control for manipulators compatible with `ros2_control`, including **Cartesian Impedance Control** and **Operational Space Control**. Developed for deploying high-level learning-based policies (VLA, Diffusion, ...) and teleoperation on your manipulator. It is robot-agnostic and compatible with any manipulator offering and effort interface. Check the [project website](https://utiasdsl.github.io/crisp_controllers/) for guides, getting started, demos and more!


> [!NOTE]
> To reduce maintenance overhead, all ROS 2 distributions are supported from a single `main` branch. The code uses compile-time macros to handle version-specific differences.

## Features
- 🐍 **Python interface** to move your ROS2 robot around without having to think about topics, spinning, and more ROS2 concepts but without loosing the powerful ROS2 API. Check [crisp_py](https://github.com/utiasDSL/crisp_py) for more information and examples.
- 🔁 **Gymnasium environment** with utilities to deploy learning-based policies and record trajectories in LeRobotFormat. Check [crisp_gym](https://github.com/utiasDSL/crisp_gym).
Expand All @@ -24,10 +28,9 @@ ______

##### Updating the website

We use [mkdocs](https://www.mkdocs.org/) to generate the website from markdown. You can modify it within `docs/` in particular the `index.md`.
Then you can serve it locally or update the github pages with:
We use [zensical](https://www.zensical.org/) to generate the website from markdown. You can modify it within `docs/` in particular the `index.md`.
You can run the website locally with:
```bash
uv run mkdocs serve
uv run mkdocs gh-deploy
pixi run zensical serve
```

The website is automatically generated and deployed on GitHub pages with the CI. You can check the [project website](https://utiasdsl.github.io/crisp_controllers/) for guides, getting started, demos and more!
2 changes: 1 addition & 1 deletion docs/getting_started_controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Robots that we tested are:

- **FR3** (real and simulated): https://github.com/danielsanjosepro/pixi_franka_ros2
- **FER/Panda** (real): https://github.com/lvjonok/pixi_panda_ros2
- **UR5** (real): https://github.com/danielsanjosepro/crisp_ur_demo
- **UR** (real): https://github.com/lvjonok/pixi_ur_ros2
- **IIWA** (simulated): https://github.com/danielsanjosepro/pixi_iiwa_ros2

### Grippers
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Our controllers have been tested in real hardware on the following robots:
</div>

<div class="robot-card">
<a href="https://github.com/danielsanjosepro/crisp_ur_demo">
<a href="https://github.com/lvjonok/pixi_ur_ros2">
<img src="media/ur10_visual.png" alt="UR5">
<div class="robot-name">UR5</div>
</a>
Expand Down Expand Up @@ -172,8 +172,8 @@ Grippers tested in real hardware:

Many thanks community contributions:

- Lev Kozlov [@lvjonok](https://github.com/lvjonok) for testing and providing interfaces for the Panda/FER.
- Vincenzo Orlando [@VinsOrl09](https://github.com/lvjonok) for testing and providing interfaces for the UR robots.
- Lev Kozlov [@lvjonok](https://github.com/lvjonok) for testing and providing interfaces for the Panda/FER and UR with pixi.
- Vincenzo Orlando [@VinsOrl09](https://github.com/lvjonok) for testing and providing interfaces for the UR robots in docker containers.
- Linus Schwarz [@Linus-Schwarz](https://github.com/Linus-Schwarz) for testing and providing interfaces for the BOTA force-torque sensors.
- Niklas Schlueter [@niklasschlueter](https://github.com/niklasschlueter) for testing and providing interfaces for the DynaArm robot.

Expand Down
Loading