Rethink Sawyer Setup¶
Overview¶
This page contains instructions for setting up the Rethink Sawyer arm with perls2.
perls2 + Rethink Sawyer Infrastructure¶
To use the Rethink Sawyer arms, we have to use ROS-kinetic. Unfortunately ROS-kinetic only works with python 2.7, which has been outdated for some time. To overcome this limitation, we use Redis, an in-memory database to communicate between the process running on the workstation and the process sending torque commands the sawyer that runs on the NUC.
perls2 uses three machines to communicate with the Franka Panda. These machines are connected in a local network. They consist of the:
Sawyer Computer: This is the main control box that comes with the Franka Panda.
Workstation (WS): The workstation hosting the perls2 environment and running any scripts to perform the robot experiment.
Control PC (NUC) or other computer with RT-PREEMPT Kernel: Typically an Intel NUC, is dedicated to running only the processes necessary for torque control.
Using the Rethink Sawyer arm with torque control requires a consistent control loop frequency for sending torque commands to the arm. In order to acheive this, a separate machine with an RT Kernel sends torques to the Master Controller.
The following processes run on the NUC:
redis-server: An in-memory database used by perls2 for interprocess communication. Hosted on the NUC and communicated with via tcp. Allows the
perls2.SawyerCtrlInterface
to bridge theperls2.Env
on the WS withintera
. See the Redis Help for more on Redis and perls2.ROSRedisPublisher: Ros node that updates redis with robot state from intera.
perls2 SawyerCtrlInterface: Process that implements the robot controller.
Robot commands and controller params are obtained from the WS.
Robot state is obtained from the franka-panda-iprl driver.
The
SaywerCtrlInterface
uses these to calculate the torques required to acheive desired robot state, and send them as a ROS JointCommand msg.
JointStatePublisherRate node Node that commands Sawyer to publish its joint state at maximum 800 Hz instead of default 500 Hz.
Set up infrastructure:¶
Setting up a Rethink Sawyer Arm¶
Set Static IP for a computer / robot¶
To set static IP for robots / computer:
IP address: <your-static-IP>
Gateway: <your-routing-gateway>
Netmask: 255.255.254.0
DNS nameservers: 171.64.1.234, 171.67.1.234
Find gateway address with netstat -r -n
. As of March 2021, all of the sawyers should be accessible by a hostname. You can see a sawyer’s host name by opening the FSM
Set Static IP for Sawyer¶
Connect a keyboard to Sawyer.
While booting up the Sawyer, repeatedly press
Ctrl+F
until you see the field service menu (FSM).Configure the network address with the information above.
Use ROS_IP naming convention.
Reboot into InteraSDK
Find MAC addr for Sawyer¶
Go to FSM
Plug in a USB driver
Export log
Open up the log in a computer
Navigate to
system/upstart/network-interface-net0.log
MAC addr is the string after
Listening on ...
Calibrate the Sawyer¶
From time to time the sawyer’s torque sensors will need to be calibrated. This is particularly important if the robot has been moved. To calibrate the Sawyer follow these instructions
Make sure the arm is not next to a wall as it will move around in all directions. You may have to move it (carefully!) to the middle of the room. Have your hand on the e-stop!
./intera.sh
rosrun intera_interface calibrate_arm.py