Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c793faa
docs(control): spec for shared sim/hardware torque controllers
juelg Nov 6, 2026
c9bc499
feat(control): add controller and interpolator interfaces
juelg Nov 6, 2026
180c572
docs(control): update spec for sim control hook and gravcomp
juelg Nov 21, 2026
03bfe9f
docs(control): compute controller state with pinocchio in sim and real
juelg Nov 21, 2026
13b7179
docs(control): state that PinocchioDynamics fills ControllerState
juelg Nov 21, 2026
d2e2745
docs(control): compensate gravity with the configured payload in sim
juelg Nov 21, 2026
50057c9
docs(control): run the sim controller in a regular per-step callback
juelg Nov 21, 2026
7520413
feat(control): document interpolator timing, allow per-goal duration
juelg Nov 21, 2026
f0f959f
docs(control): record interpolator timing and open-question decisions
juelg Nov 21, 2026
5ab4063
feat(control): add linear joint and cartesian interpolators
juelg Nov 21, 2026
a4c96a2
feat(control): add PinocchioDynamics to compute the controller state
juelg Nov 21, 2026
97be060
refactor(control): share the rotation vector helper
juelg Nov 21, 2026
05ccac8
feat(control): add JointPD and OSC controllers
juelg Nov 21, 2026
6e9439f
fix(control): couple position and orientation in the OSC
juelg Nov 21, 2026
3324b73
feat(sim): torque control of SimRobot with the shared controllers
juelg Nov 21, 2026
51b7fe2
feat(control): port the FR3 joint and OSC controllers to core
juelg Nov 21, 2026
cf87eaa
refactor(fr3): run the core FR3 controllers in the libfranka loops
juelg Nov 21, 2026
f48c39b
fix(fr3): take the guard's joint limits from the robot config
juelg Nov 21, 2026
c7a2bc1
feat(sim): timestep in SimConfig, 1 ms by default
juelg Nov 21, 2026
09c89a8
fix(fr3): stop FrankaConfig from hiding RobotConfig::joint_limits
juelg Nov 21, 2026
6343ee4
feat(control): select the controller with RobotConfig::controller
juelg Nov 21, 2026
bb59b0b
style: clang-format and ruff fixes for the controller work
juelg Nov 21, 2026
7c92f2e
fix(config): stop FrankaConfig and SimRobotConfig from hiding robot_t…
juelg Nov 22, 2026
f61ffe1
feat(config): take the robot specific fields from rcs.ROBOTS only
juelg Nov 22, 2026
a2be2d3
feat(sim): no FR3 names as SimRobotConfig defaults
juelg Nov 22, 2026
a90f3f7
feat(fr3): define FR3Config and PandaConfig in Python
juelg Nov 22, 2026
b495cf5
feat(control): safety stage for the torques of any controller
juelg Nov 22, 2026
49cc493
refactor(control): FR3 controllers without their own safety stage
juelg Nov 22, 2026
e4ef75c
refactor(fr3): remove the controller gains from FrankaConfig
juelg Nov 22, 2026
7f1d8c9
feat(config): end effector config with the TCP offset and the payload
juelg Nov 22, 2026
902708f
feat(pybind): copy and deepcopy for all bound value types
juelg Nov 22, 2026
40aff32
fix(fr3): rcs_fr3.hw and rcs_panda.hw re-export every class of the C+…
juelg Nov 22, 2026
59ba0dd
docs(fr3): the default controllers have no gains in FrankaConfig anymore
juelg Nov 22, 2026
00f7a97
refactor(control): no null-space joint-limit avoidance in the FR3 OSC
juelg Nov 22, 2026
b5493f5
feat(control): joint-limit guard from the robot's velocity limits
juelg Nov 22, 2026
599b5e8
fix(control): residual mass for the generic OSC
juelg Nov 22, 2026
938a39d
feat(control): optional velocity feed-forward in the generic OSC
juelg Nov 22, 2026
91f2c4f
feat(control): no velocity feed-forward in the generic OSC by default
juelg Nov 22, 2026
b7f5e49
feat(control): no velocity feed-forward in JointPD by default
juelg Nov 22, 2026
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
365 changes: 365 additions & 0 deletions docs/development/controller_interface.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

python_extension
cpp_extension
controller_interface
../contributing/index
```
5 changes: 3 additions & 2 deletions docs/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ simulation = sim.Sim(rcs.SCENE_PATHS["empty_world"])
ik = rcs.common.Pin(robot_meta.mjcf_model_path, robot_meta.attachment_site, joint_limits=robot_meta.joint_limits)

# Configure robot
cfg = sim.SimRobotConfig()
cfg.tcp_offset = rcs.common.Pose(rcs.common.FrankaHandTCPOffset())
cfg = robot_meta.apply(sim.SimRobotConfig()) # type, model, dof, joint limits, home pose
cfg.joints = cfg.actuators = [f"fr3_joint{i}" for i in range(1, 8)]
cfg.end_effector.tcp_offset = rcs.common.Pose(rcs.common.FrankaHandTCPOffset())
robot = rcs.sim.SimRobot(simulation, ik, cfg)

# Configure gripper
Expand Down
11 changes: 6 additions & 5 deletions docs/user_guide/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,17 @@ Common examples in the repository are:

If you are unsure which frame a robot uses, check its config or the relevant example scene in `python/rcs/envs/configs.py`.

### Tool frame: `tcp_offset`
### Tool frame: `end_effector.tcp_offset`

`tcp_offset` is applied on top of the attachment site to define the actual tool center point (TCP) used by motion commands and IK.
`end_effector.tcp_offset` is applied on top of the attachment site to define the actual tool center point (TCP) used by motion commands and IK.

In practice:

- `attachment_site` = frame coming from the robot model
- `tcp_offset` = extra transform from that frame to the tool you actually want to control
- `end_effector.tcp_offset` = extra transform from that frame to the tool you actually want to control
- `end_effector.payload` = optional mass properties of the tool, used by torque control (see the controller docs)

A typical example is a wrist-mounted gripper where the tool center point is slightly in front of the model's attachment site.
A typical example is a wrist-mounted gripper where the tool center point is slightly in front of the model's attachment site. On a Franka, Desk's end effector settings describe the same tool; RCS does not take them over but warns when they differ from `end_effector`.

## Pose representations

Expand Down Expand Up @@ -213,7 +214,7 @@ When something looks wrong, check these first:
1. Are you working in **world frame** or **robot/base frame**?
2. Does your robot/base frame follow **x forward, y left, z up**?
3. Is your end-effector frame the correct `attachment_site`?
4. Did you apply the right `tcp_offset`?
4. Did you apply the right `end_effector.tcp_offset`?
5. Are your quaternions **xyzw** in RCS?
6. Are you accidentally feeding **MuJoCo `wxyz`** into an RCS API?
7. Are your Euler angles ordered as **roll, pitch, yaw** around **x, y, z**?
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/scene_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ When building an RCS sim scene, it helps to think about five frames:
- Low-level kinematics and Cartesian commands are expressed here.

5. **i-th robot `attachment_site`**
- The end-effector mounting frame for that robot, before any optional `tcp_offset`.
- The end-effector mounting frame for that robot, before any optional `end_effector.tcp_offset`.
- Use this for wrist-mounted objects, cameras, and tools.

A good rule of thumb is:
Expand Down Expand Up @@ -128,7 +128,7 @@ Each robot entry usually defines things such as:
- robot type
- kinematic model path
- `attachment_site`
- `tcp_offset`
- `end_effector` (`tcp_offset`, optional `payload`)
- joint names and actuator names
- base link name
- degrees of freedom, joint limits, and `q_home`
Expand Down
2 changes: 1 addition & 1 deletion examples/fr3/fr3_direct_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def main():
default_env.ip = ROBOT_IP
env_cfg = default_env.config()
fr3_cfg = env_cfg.robot_cfg
fr3_cfg.tcp_offset = rcs.common.Pose(rcs.common.FrankaHandTCPOffset())
fr3_cfg.end_effector.tcp_offset = rcs.common.Pose(rcs.common.FrankaHandTCPOffset())
ik = rcs.common.Pin(
fr3_cfg.kinematic_model_path,
fr3_cfg.attachment_site,
Expand Down
2 changes: 1 addition & 1 deletion extensions/rcs_flexiv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ targets, so RCS never has to stream at 1 kHz.

In the joint modes, RCS's Cartesian control modes go through the Pinocchio IK of the RCS robot
model, exactly like in simulation. In `CARTESIAN_IMPEDANCE` the target pose is handed to the
robot's own Cartesian controller instead; RCS converts its TCP (`tcp_offset`) to the TCP of the
robot's own Cartesian controller instead; RCS converts its TCP (`end_effector.tcp_offset`) to the TCP of the
active tool for that. Joint targets and `move_home` temporarily switch to joint impedance in that
mode, mode switches stop the arm.

Expand Down
2 changes: 1 addition & 1 deletion extensions/rcs_flexiv/src/rcs_flexiv/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def config(self) -> FlexivHardwareEnvCreatorConfig:
dof=rcs.ROBOTS[robot_type].dof,
joint_limits=rcs.ROBOTS[robot_type].joint_limits,
q_home=rcs.ROBOTS[robot_type].q_home,
tcp_offset=rcs.GRIPPER_TCP_OFFSETS[gripper_type],
end_effector=rcs.common.EndEffectorConfig(tcp_offset=rcs.GRIPPER_TCP_OFFSETS[gripper_type]),
)

gripper_cfg = FlexivGripperConfig(
Expand Down
6 changes: 3 additions & 3 deletions extensions/rcs_flexiv/src/rcs_flexiv/hw.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def get_cartesian_flange_position(self) -> common.Pose:
return self.ik.forward(self.get_joint_position(), common.Pose())

def get_cartesian_position(self) -> common.Pose:
return self.get_cartesian_flange_position() * self._config.tcp_offset
return self.get_cartesian_flange_position() * self._config.end_effector.tcp_offset

def set_joint_position(self, q: np.ndarray[tuple[typing.Any], np.dtype[np.float64]]) -> None:
q = np.asarray(q, dtype=np.float64)
Expand All @@ -279,7 +279,7 @@ def set_joint_position(self, q: np.ndarray[tuple[typing.Any], np.dtype[np.float6

def set_cartesian_position(self, pose: common.Pose) -> None:
if self._config.control_mode != FlexivControlMode.CARTESIAN_IMPEDANCE:
q = self.ik.inverse(pose, self.get_joint_position(), self._config.tcp_offset)
q = self.ik.inverse(pose, self.get_joint_position(), self._config.end_effector.tcp_offset)
if q is None:
logger.warning("IK failed for %s", pose)
return
Expand All @@ -289,7 +289,7 @@ def set_cartesian_position(self, pose: common.Pose) -> None:
self._ensure_mode(FlexivControlMode.CARTESIAN_IMPEDANCE)
# The RDK tracks the pose of the active tool's TCP in its world frame, RCS commands the pose of its own
# TCP offset in the base frame.
rdk_target = self._world_from_base * pose * self._config.tcp_offset.inverse() * self._tool_tcp
rdk_target = self._world_from_base * pose * self._config.end_effector.tcp_offset.inverse() * self._tool_tcp
self._robot.SendCartesianMotionForce(
_pose_to_rdk(rdk_target),
[0.0] * 6,
Expand Down
2 changes: 1 addition & 1 deletion extensions/rcs_flexiv/src/rcs_flexiv/scripts/test_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main() -> None:
dof=rcs.ROBOTS[robot_type].dof,
joint_limits=rcs.ROBOTS[robot_type].joint_limits,
q_home=rcs.ROBOTS[robot_type].q_home,
tcp_offset=rcs.GRIPPER_TCP_OFFSETS[gripper_type],
end_effector=rcs.common.EndEffectorConfig(tcp_offset=rcs.GRIPPER_TCP_OFFSETS[gripper_type]),
)
ik = rcs.common.Pin(robot_config.kinematic_model_path, robot_config.attachment_site)
robot = Flexiv(robot_config, ik)
Expand Down
Loading
Loading