Skip to content

Commit 66f7780

Browse files
committed
README cleanups
1 parent d3946de commit 66f7780

File tree

3 files changed

+39
-38
lines changed

3 files changed

+39
-38
lines changed

README.md

+37-36
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
11
# Experimental MoveIt 2 - Drake Integration
22

3-
NOTE: Experimental and will continue to have breaking changes until first
4-
release.
3+
> [!NOTE]
4+
> Experimental and will continue to have breaking changes until first release.
55
6-
`moveit_drake` brings together the vertical ROS integration of the
7-
[MoveIt 2](https://moveit.ai/) motion planning framework, with the Mathematical
8-
Programming interface within [Drake](https://drake.mit.edu/). This allows the
9-
user to setup motion planning as an optimization problem within ROS, with the
10-
rich specification of constraints and costs provided by `drake`.
6+
`moveit_drake` brings together the vertical ROS integration of the [MoveIt 2](https://moveit.ai/) motion planning framework, with the Mathematical Programming interface within [Drake](https://drake.mit.edu/).
7+
This allows the user to setup motion planning as an optimization problem within ROS, with the rich specification of constraints and costs provided by `drake`.
118

129

1310
## Features
1411

15-
- Exposes
16-
[`KinematicTrajectoryOptimization`](https://drake.mit.edu/doxygen_cxx/classdrake_1_1planning_1_1trajectory__optimization_1_1_kinematic_trajectory_optimization.html)
17-
implementation in `drake`.
18-
- Exposes [`TOPPRA`](https://drake.mit.edu/doxygen_cxx/classdrake_1_1multibody_1_1_toppra.html) implementation in `drake`.
12+
- Exposes [`KinematicTrajectoryOptimization`](https://drake.mit.edu/doxygen_cxx/classdrake_1_1planning_1_1trajectory__optimization_1_1_kinematic_trajectory_optimization.html) implementation in `drake` as a motion planner.
13+
- Exposes [`TOPPRA`](https://drake.mit.edu/doxygen_cxx/classdrake_1_1multibody_1_1_toppra.html) implementation in `drake` as a trajectory post-processor.
1914

2015
## Docker Workflow (Preferred and tested)
2116

2217
### Requirements
23-
`docker` and `docker-compose` - Follow instructions
24-
[here](https://docs.docker.com/engine/install/ubuntu/).
18+
Docker and Docker Compose - Follow the instructions [here](https://docs.docker.com/engine/install/ubuntu/).
19+
Also, run the [Linux post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/).
2520

2621
### Steps
27-
The following steps clone and build the base image that you will require to
28-
test/build/run/develop with the repo
22+
The following steps clone and build the base image that you will require to test/build/run/develop with the repo.
2923

30-
git clone https://github.com/moveit/moveit_drake.git
31-
cd moveit_drake
32-
docker compose build
24+
```bash
25+
git clone https://github.com/moveit/moveit_drake.git
26+
cd moveit_drake
27+
docker compose build
28+
```
3329

3430
This should give you an image with `drake` and `moveit2`.
3531
Next, create a container with the following and create shell access.
3632

37-
docker compose up
38-
docker compose exec -it moveit_drake bash
33+
```bash
34+
docker compose up
35+
docker compose exec -it moveit_drake bash
36+
```
3937

4038
Follow [instructions](#build-moveit_drake) below to build `moveit_drake`
4139

@@ -48,25 +46,28 @@ Follow [instructions](#build-moveit_drake) below to build `moveit_drake`
4846

4947
### Build `moveit_drake`
5048

51-
Follow the [MoveIt Source
52-
Build](https://moveit.ros.org/install-moveit2/source/) instructions to set up a
53-
colcon workspace with MoveIt from source.
49+
Follow the [MoveIt Source Build](https://moveit.ros.org/install-moveit2/source/) instructions to set up a ROS 2 workspace with MoveIt from source.
5450

55-
Open a command line to your colcon workspace:
51+
Open a command line and navigate to your workspace:
5652

57-
cd ${WORKSPACE}/src
53+
```bash
54+
cd ${WORKSPACE}/src
55+
```
5856

59-
Download the MoveIt Tutorials source code:
57+
Download the MoveIt 2 Tutorials source code:
6058

61-
git clone https://github.com/moveit/moveit_drake.git
62-
vcs import < moveit_drake/moveit_drake.repos
63-
rosdep install -r --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y
59+
```bash
60+
git clone https://github.com/moveit/moveit_drake.git
61+
vcs import < moveit_drake/moveit_drake.repos
62+
rosdep install -r --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y
63+
```
6464

65-
Configure and build the workspace (this will take some time, as it builds
66-
moveit):
65+
Configure and build the workspace (this will take some time, as it builds MoveIt):
6766

68-
cd ${WORKSPACE}
69-
colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1
67+
```bash
68+
cd ${WORKSPACE}
69+
colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1
70+
```
7071

7172

7273
## Examples
@@ -88,17 +89,17 @@ ros2 launch moveit_drake constrained_planning_demo.launch.py
8889

8990
### Formatting
9091

91-
Use [pre-commit to format your code](https://moveit.ros.org/documentation/contributing/code/#pre-commit-formatting-checks)
92+
We use [pre-commit](https://moveit.ros.org/documentation/contributing/code/#pre-commit-formatting-checks) to format the code in this repo.
9293

93-
Within the container, you can run the following command to format the code
94+
Within the container, you can run the following command to format the code:
9495

9596
```bash
9697
# inside the moveit_drake package
9798
pre-commit run -a
9899
```
99100

100101
### Some helper commands
101-
To just rebuild `moveit_drake`.
102+
To rebuild only the `moveit_drake` package:
102103

103104
```bash
104105
rm -rf build/moveit_drake install/moveit_drake

include/ktopt_interface/ktopt_planning_context.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class KTOptPlanningContext : public planning_interface::PlanningContext
8181

8282
/**
8383
* @brief Adds path position constraints, if any, to the planning problem.
84-
* @param trajopt The Drake mathematical program containing the trajectory optimization problem.
84+
* @param trajopt The Drake object containing the trajectory optimization problem.
8585
* @param plant The Drake multibody plant to use for planning.
8686
* @param plant_context The context associated with the multibody plant.
8787
* @param padding Additional position padding on the MoveIt constraint, in meters.

src/ktopt_planning_context.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void KTOptPlanningContext::solve(planning_interface::MotionPlanResponse& res)
7878
moveit::drake::getJerkBounds(joint_model_group, plant, lower_jerk_bounds, upper_jerk_bounds);
7979

8080
// q represents the complete state (joint positions and velocities)
81-
Eigen::VectorXd q = Eigen::VectorXd::Zero(plant.num_positions() + plant.num_velocities());
81+
auto q = Eigen::VectorXd::Zero(plant.num_positions() + plant.num_velocities());
8282
q << moveit::drake::getJointPositionVector(start_state, getGroupName(), plant);
8383
q << moveit::drake::getJointVelocityVector(start_state, getGroupName(), plant);
8484

0 commit comments

Comments
 (0)