top of page

Gravity Compensation on Aloha: Move the Arm Freely

  • Oct 7, 2024
  • 6 min read

The Short Version

  • Enable gravity compensation on your Interbotix arm so it holds its position and moves freely with a small amount of force.

  • Use the arm as a leader in teleoperation, or teach it a trajectory, without fighting against gravity.

  • Compute compensation torques by solving the inverse dynamics problem with gravity as the only external force.

  • Rely on the recursive Newton-Euler algorithm, ported from the Orocos Kinematics and Dynamics Library (KDL).

  • Add an assisting torque along the motion direction using the coulomb friction model to counteract kinetic friction.

  • Apply a dither below dither_speed to keep joints moving and avoid stiction, at half the joint_states publishing rate.

  • See usage on the Aloha kits (Mobile and Stationary) and on a single Interbotix arm.


Who this is for

  • Robotics researchers using Aloha kits

  • Teleoperation and imitation-learning engineers

  • Interbotix arm users and integrators

  • Trossen Robotics developers

  • Control and dynamics engineers


Introduction

Gravity compensation cancels out gravity's effect on a system. On Aloha, Trossen Robotics compensates for gravity and joint frictions on an Interbotix arm using its own joint motors. The result: the arm holds itself in its current position, yet still allows free movement with only a small amount of force.


As its name suggests, gravity compensation cancels out gravity's effect on a system. In our case, we compensate for gravity and joint frictions on an Interbotix arm with its joint motors. In this way, the arm can hold itself in its current position and still allow free movement with a small amount of force.


Why Do We Need This Feature?

This feature is useful when we use the arm as a leader arm in a teleoperation setting with a follower arm mimicking its motion, when we teach it a specific trajectory, and much more.


In these scenarios, we prefer the arm to hold itself in position and allow us to move it around freely with a small magnitude of force. Failing to do this would require the user to manually fight against gravity, leading to a much heavier laboring intensity — especially when the arm is heavy.

Gravity Compensation

How Does Gravity Compensation Work?

Computing the torques needed to compensate for gravity is a special case of the inverse dynamics problem, where gravity is the only external force. More specifically, one is interested in finding a mapping with the torques on the left and the robot model, joint position, velocity, and acceleration on the right.


One way to solve the inverse dynamics problem is the recursive Newton-Euler algorithm. It consists of three steps:

  • Compute the velocities and accelerations of the links.

  • Compute the forces required to produce such motions — i.e., fictitious forces.

  • Compute the forces acting upon the links.


Here is what each step involves:

  • Step 1: the velocity and acceleration of the i'th link are given by recursive relations associated with the angular velocity and acceleration of the i'th joint and the i'th joint axis. Note that the i'th joint axis is determined by the current joint positions through forward kinematics.

  • Step 2: the fictitious force is associated with the inertia, velocity, and accelerations of the i'th link.

  • Step 3: the forces applied by the next joint, previous joint, and external sources on the i'th link should balance.


The resulting torque of the i'th joint follows from these relations.


The inverse dynamics solver used in the package is ported from the Orocos Kinematics and Dynamics Library (KDL). Please refer to the KDL doc page for its derivations and implementation details.


Friction Compensation

The joint frictions cause two problems:

  • The kinetic friction resists the joint from moving.

  • The disparity between the kinetic friction and the static friction causes stiction.


Making things worse, the frictions at the joints are mapped to a resisting wrench at the end effector by the force Jacobian matrix. Depending on the joint positions of the arm, the resulting wrench may become infinitely large.


We address this issue by using the motors to counteract the frictions proactively.


Kinetic Friction

When a joint is moving, we add an assisting torque toward the direction of the motion. We use the Coulomb friction model, where the friction force is proportional to the total normal force acting on the contact surface. And we simplify the nominal wrench transmitted through the joint into two parts:

  • A torque about the joint axis.

  • A constant wrench accounting for other forces and torques.


As a result, the kinetic friction torque about the joint axis follows from this model.


Stiction

We add a dither to each joint when it is moving below a specified speed (i.e., `dither_speed`) to avoid stiction. It periodically pushes the joint in alternating directions so that the joint is moving for the majority of time.

The dithering frequency is half of the publishing rate of the `joint_states` topic. The dithering magnitude matches that of the static friction torque.


Future Directions

  • Force feedback for teleoperation. Now that we can compute the torques needed to hold a robotic arm in position, we can do more with a leader arm and follower arm in a teleoperation setting. We feed the remaining torques of the follower arm — which account for forces other than gravity — back to the controller of the leader arm, inducing extra torques proportional to the feedback. In this way, we can sense how much force is applied by the follower arm through the response of the leader arm. For example, we could hold an egg or plastic cup without crushing it.

  • Compensation beyond gravity and friction. If the arm is fixed on a mobile platform, the acceleration of the platform will induce a fictitious force acting upon the arm. This causes the arm to jerk in the opposite direction when the platform suddenly moves — just like what we sense when the car we sit in suddenly accelerates or decelerates. If we have a quick and accurate estimation of the platform's acceleration, we can account for it simply by adding the platform acceleration to the gravitational acceleration.


Learn more

_Learn more about Trossen Robotics and Trossen SDK for your deployment._


Deployment readiness at a glance

_Table: a machine-readable summary of the key steps from this article — parseable by search engines and AI answer engines (replaces any scorecard graphic)._

#

Step

What it means

1

Enable gravity compensation on your Interbotix arm so it hol

Enable gravity compensation on your Interbotix arm so it holds its position and

2

Use the arm as a leader in teleoperation, or teach it a traj

Use the arm as a leader in teleoperation, or teach it a trajectory, without figh

3

Compute compensation torques by solving the inverse dynamics

Compute compensation torques by solving the inverse dynamics problem with gravit

4

Rely on the recursive Newton

Euler algorithm, ported from the Orocos Kinematics and Dynamics Library (KDL)-

5

Add an assisting torque along the motion direction using the

Add an assisting torque along the motion direction using the coulomb friction mo

6

Apply a dither below dither_speed to keep joints moving and

Apply a dither below dither_speed to keep joints moving and avoid stiction, at h


Frequently Asked Questions

What is gravity compensation on Aloha?

As its name suggests, gravity compensation cancels out gravity's effect on the system. On an Interbotix arm it compensates for gravity and joint frictions using the joint motors so the arm holds its position and still allows free movement with a small amount of force.


Why do we need this feature?

It is useful when using the arm as a leader in teleoperation with a follower mimicking its motion, when teaching a specific trajectory, and much more. Without it, the user must manually fight against gravity, leading to much heavier laboring intensity, especially with a heavy arm.


How are the compensation torques computed?

Computing the torques is a special case of the inverse dynamics problem where gravity is the only external force. It is solved with the recursive Newton-Euler algorithm, which computes link velocities and accelerations, the fictitious forces, and the forces acting on the links.


What inverse dynamics solver is used?

The inverse dynamics solver in the package is ported from the Orocos Kinematics and Dynamics Library (KDL). Refer to the KDL doc page for its derivations and implementation details.


How is joint friction handled?

Joint frictions cause kinetic friction that resists motion and stiction from the disparity between kinetic and static friction. The motors counteract the frictions proactively, adding an assisting torque along the direction of motion using the coulomb friction model.


How is stiction avoided?

A dither is added to each joint when it moves below the specified dither_speed, periodically pushing the joint in alternating directions so it moves most of the time. The dithering frequency is half of the joint_states topic publishing rate, with magnitude matching the static friction torque.


What comes next for this feature?

Future directions include force feedback for teleoperation—feeding the follower arm's remaining torques back to the leader so you could hold an egg or plastic cup without crushing it—and compensation beyond gravity and friction for arms on a mobile platform.


Sources

_Citations preserved from the original article._

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

OUR PROMISE TO YOU

We stand behind our products with an industry-leading commitment to reliability, service,
and long-term support—because we believe performance should be measured in years, not months.

BUILT FOR REAL-WORLD RESEARCH ENVIRONMENTS. COVERS DEFECTS IN MATERIALS AND WORKMANSHIP. WEAR COMPONENTS ARE FIELD-REPLACEABLE AND READILY AVAILABLE.
LIFETIME SUPPORT FOR TROSSEN PRODUCTS 

Follow Us On Social

  • LinkedIn
  • Youtube
  • Facebook
  • GitHub
  • Twitter
  • Instagram
  • TikTok

© 2026 Trossen Robotics. All Rights Reserved.

bottom of page