User Tools

Site Tools


HEBI Arm Hello World

Author: Leonardo Georgescu and Jason Kreitz
Email: [email protected] and [email protected]
Date: Last Edited 11/20/2020
Keywords: Hebi Arm, IK, Python SDK, ROS

Hebi arm is a 6 DoF arm that has a gripper and is able to pick and place objects. The benefit of the arm is that it has series elastic actuators. It also has force-torque sensors which I will be discussing how they work later.

Hardware Connection
1. Connect the Dexter arm to the router using an ethernet cable. Then connect your computer to the router.Connecting Dexter directly to your computer will not work without knowing the IP address. DHCP automatically allocates an IP address but only through the router and for this reason we use a static IP address. There will be additional steps needed.

Connecting to Hebi using their GUI
1. Hebi is powered by a 36V power supply.
2. Connect the ethernet cable to your computer.
3. Ensure that you are connected to the ethernet by going in your network configurations. This would be different depending on what iOS you are using.
4. Download the software Hebi Scope for your operating system from this website:
5. Once you are in the Scope software, click on Settings in the bottom left. The robot may not show up yet which is alright. Under Network Interface click the revolving arrow as shown in the image bellow.

6. You should see the following on the Scope which indicates that you are connected to the robot. Using this GUI you can see the IP Address, each individual motor, and other useful information.

Joint Limits from Scope
These joint limits were tested by moving each individual joint in Scope.

Joint 1: Min(-6.2rad)    Max(+6.2 rad) Full Range
Joint 2: Min(0.1 rad)    Max(1.4 rad) 
Joint 3: Min(-2.7 rad)   Max(2.5 rad) 
Joint 4: Min(-1.6 rad)   Max(3.9 rad) 
Joint 5: Min(-6.2 rad)   Max(+6.2 rad) Full Range 
Joint 6: Full Range 

Here are the instructions on operating it using the Python SDK
1. Download PyCharm from here:
2. Create an environment and since you will be connected to the hardware make sure not to select virtual environment. Under project interpreter, click “Existing Interpreter” and create the project.
3. Make sure you have pip installed in Pycharm
4. If you are using a linux machine type “pip install –user hebi-py” and if you're not using a linux machine like me then use “pip install hebi-py.”
5. In Pycharm, make sure to download the hebi-py library. Click “Preferences for Project.” Under “Project Interpreter” click the plus sign on the bottom and search for “hebi-py” and then “Install Packages.”

6. Now we should write a Python script to check if we can read the motors. The python code below was taken from the Hebi website and also provided below:

import hebi
from time import sleep
lookup = hebi.Lookup()
sleep(2) #2 seconds to discover what is needed
print('The following modules are found:')
for entry in lookup.entrylist:
    print(f'{} | {}')

7. The link below shows you how to work with the arm with, for example, Forward Kinematics, Jacobians, and Inverse Kinematics. You can also look up how to write trajectories.
Hebi Tutorial Website:
8. For full API documentation please visit this website:

Gazebo Simulation
For the full Gazebo simulator please see this github repository:

ROS Interface Tutorial

Arm Model:= A-2085-06
Home position:[0,1.69517,2.16275,2.44159,-1.39,1.57459]

Use the below bash script to install the ROS packages.

sudo apt-get install ros-<ros-distro>-hebi-cpp-api
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone
git clone
git clone hebi_cpp_api_examples
cd ..

Warning: Make sure you have the power supply nearby in case you need to shut off the robot. If the IK seed is set improperly, the robot will move erratically. Just make sure you have it just in case – until you’re comfortable.

First Test: Run Premade Movements
Open the file catkin_ws/src/hebi_cpp_api_examples/data/paths/6_dof_circle.txt and change “paths/circle” to “data/paths/circle”. Repeat for data/waypoints/6_dof_home.txt, etc. (ie. data/waypoints/home, data/waypoints/pick…) for all other files within the waypoints folder.

Then, run the below script in order to start the Hebi Arm.

roslaunch hebi_cpp_api_examples arm_teach_repeat_6_dof.launch 

In order to make the arm move, run the below script in a terminal. Make sure that index and mode are on new lines.

rostopic pub /playback hebi_cpp_api_examples/Playback "name: 'circle'
index: 0
mode: 2"

Basically, the roslaunch will include the list of paths and waypoints from the txt files, and the arm_teach_repeat node will then load those paths and waypoints into named vectors. Those vectors can then be ran when you publish a “Playback” message (from hebi_cpp_api_examples/Playback) on the /playback topic. The name of the path should be ‘circle’ (ie from data/paths/circle), and the mode should be 2. You can find what the different modes are by looking at the Playback.msg file. For more information on how the node accomplishes this, read the arm_teach_repeat_node.cpp and arm_teach_repeat_node.hpp files within the src/kits/arm directory.

Second Test: Move Robot by Publishing on Topics
Run the following two scripts in separate terminals:

rosrun hebi_cpp_api_examples arm_node 
rosservice call -- /set_ik_seed [0,1.69517,2.16275,2.44159,-1.39,1.57459]

Topics that the arm listens to after running the above rosrun:

1. /offset_target (geometry_msgs::Point) This topic will jog the end effector in the given cartesian direction relative to the base.
It requires a geometry_msgs::Point message, then will “jog” (move a short relative distance)
The below three lines is one example terminal command (make sure that y and z are on separate newlines):

rostopic pub /offset_target geometry_msgs/Point "x: 0.1 
y: 0.1
z: 0.1"

(I would recommend not moving more than 0.1 in any direction. The arm moves very fast, and moving it more than 0.1 in any direction will make it jump unsafely)
If you want to use the offset in an actual client node, just create a publisher to publish a Point message to this topic.
This mode would be useful for implementing the use of a game controller…

2. /cartesian_waypoints (hebi_cpp_api_examples::TargetWaypoint)
Command the arm to move through a series of cartesian-space (relative to the base) waypoints
Allows us to specify an array/queue of geometry_msgs/Point messages, and then move along that trajectory.
You can publish an array of Point messages on the topic as the waypoints_vector.
The below lines are examples of terminal commands that we can use to publish on the topics.

rostopic pub /cartesian_waypoints hebi_cpp_api_examples/TargetWaypoints "waypoints_vector:
- x: 0.2
  y: 0.3
  z: 0.0" 
rostopic pub /cartesian_waypoints hebi_cpp_api_argetWaypoints "waypoints_vector:
- x: 0.2
  y: 0.3
  z: 0.2" 
rostopic pub /cartesian_waypoints hebi_cpp_api_examplesargetWaypoints "waypoints_vector:
- x: 0.2
  y: 0.3
  z: 0.4" 

I'm personally not a big fan of this one. It doesn’t give the user control over the timing of queue execution. In addition, Point messages only allow for X, Y, Z movement – no end effector rotation.
In reality, the end effector just moves around without any user control, and there’s nothing that the user can really do about it…

3. /joint_waypoints (trajectory_msgs::JointTrajectory)
Command the arm to move through a series of joint-space waypoints
Same as the above, except with trajectory messages in joint space (joint thetas, instead of cartesian coordinates of the end effector).
This most likely will allow us to control the entire robot, including the end effector rotation (unlike the above), but it requires us to use our own IK solver if we want to use IK. I haven’t yet tested this one.

4. /motion (action, hebi_cpp_api_examples::ArmMotion)
Use a ROS action to move the robot to a given Cartesian location.
Uses the ROS ActionLib API to give control over the robot queuing system. For more information on using the ROS ActionLib API, take a look at my RB5 ROS Wrapper at I have examples of Action Clients in the /example_clients folder. Actual implementation of the Action Client will be in the RB5_Client.h file in /src and the implementation of its Action Server will be in the wrapper.cpp file in /src.

For some reason, their implementation is giving me errors. I have a simple test client that is passing the same parameters as cartesian_waypoints, but for some reason there are errors internal to the actual Hebi ROS node – and I’m not sure yet how to fix them. I’m giving the correct data structure to the messages, and I’m not receiving any compiler errors – it seems like the error is coming from the IK solver itself…

In addition to the above, the current robot orientation information can be found by running the following in a terminal:

rostopic echo /joint_states 

Comments: I’m not too sure what set_ik_seed actually does, but I think (after reading – I could definitely use some clarification onto how the IK solver works) that the IK solver uses some sort of gradient descent for local minimum, and the ik_seed is required in order to set the initial test value. I used the home position as seed, and it works very well – even though it’s joint positions and not Cartesian.

Note/Warning: I gave the IK seed the following array, and it freaked out when I gave it a movement command: [0.01,1.0,2.5,1.5,-1.5,0.01]. I got this value from the following link: So this means that the IK seed value is very important, and the robot WILL move erratically.

Third Test: Open and Close Gripper

Replace the following line in the file gripper_node.cpp in the src/kits/arm folder

    [Line 80] if (!gains_cmd.readGains(ros::package::getPath(gains_package) + std::string("/") + gains_file))

With the following lines of code:

    std::string myTest = ros::package::getPath(gains_package) + std::string("/") + gains_file;
    std::vector<char> chars(myTest.begin(), myTest.end());
    char *c = &chars[0];
    if (!c)

Then run the following line in one terminal to activate the gripper's subscribers:

rosrun hebi_cpp_api_examples gripper_node 

Afterwards, run the following line to close the gripper:

rostopic pub /gripper_strength std_msgs/Float64 "data: 0.5" 

Note: You should be able to use any float between 0 and 1 for the above. Even if the gripper is closed, by turning up the effort value, you should be able to grip stronger…

Or run the following line to open the gripper:

rostopic pub /gripper_strength std_msgs/Float64 "data: 0.0" 

Again, we can write a node that publishes to these topics so that we can control the robot in our own client.

hebi_arm_tutorial.txt · Last modified: 2020/11/20 05:16 by jkreitz