FR3Py is unified Python simulation and hardware communication environment for Franka FR3 robots.
We assume libfranka has been installed systemwide. If not, follow through the Building libfranka steps here and at the end, do `sudo make install to install the library system-wide.
Simply install with pip in the root directory of the repository:
python3 pip3 install .
Compile and install the bridge as follows:
cd fr3_bridge
mkdir build && cd build
cmake ..
make -j $(( $(nproc) - 1 ))
make
sudo make install
To control the gripper with python install the fr3_gripper
as instructed here.
Run the C++ node to communicate with the robot:
fr3_joint_interface <robot_ip> <robot_name> <interface_type>
where robot_name
is a unique name used to determine the name of the LCM topics used for the robot with IP robot_ip
and interface_type
determines how we want to command the robot. Currently, torque
and velocity
are supported.
In case you want to access the interface through a python environment hosted by another computer on the same network, you need to enable multicast support for the particular interface used for connecting to the local network. To do so, first get the name of the interfcace by running:
ifconfig
and use it to run the unicast_config.py
file in the tools
directory of this repository. This script much be executed with sudo privileges:
sudo python3 tools/multicast_config.py <interface_name> # e.g. eth0
- Power on the Franka arm (power button on the black control box).
- Turn on the middle computer:
Advanced Options for Ubuntu
->Ubuntu, with Linux 5.9.1-rt20
.
- On the middle computer, open the Franka control panel:
https://192.168.123.250/desk/
In Firefox. - On the Franka control panel, click
Activate FCI
in the top-left menu. - On the Franka control panel, in the
Joints
panel, click the unlock button.
- On the middle computer, open the terminal and run the following command
ifconfig
to get the IP address of the middle computer. This typically starts with192.168.XXX.XXX
. - Run the following command on the middle computer to enable multicast support for the particular interface used for connecting to the local network.
sudo python3 ~/FR3Py/tools/multicast_config.py <interface_name> # e.g. enp3s0f0
- On the another computer, run
ifconfig
agai. Open the terminal and run the following command to connect to the middle computer.
sudo python3 FR3Py/tools/multicast_config.py <interface_name> # e.g. enp0s31f6
Run the C++ node to communicate with the robot:
fr3_joint_interface <robot_ip> <robot_name> <interface_type>
where robot_name
is a unique name used to determine the name of the LCM topics used for the robot with IP robot_ip
and interface_type
determines how we want to command the robot. Currently, torque
and velocity
are supported. For example, fr3_joint_interface 192.168.123.250 fr3 torque
.
We provide a simple simulation environment based on the Isaac Sim. The Isaacsim simulation only implements the joint velocity interface. The API follows the exact interfacing API as the one used for communicating with the real robot, and is designed to simulate the experience of using the real-robot as closely as possible.
To use the simulator, create a link to the builtin Python interpreter provided by Isaac Sim:
cd FR3Py
ln -s ${ISAACSIM_PATH} _isaac_sim
where ISAACSIM_PATH
points to the installation path of the simulator. Then install FR3Py for the Python interpreter provided by Isaac Sim:
./fr3py.sh -i
After installation, we can run the simulation node simply by running the fr3py.sh
with the --sim
option:
./fr3py.sh --sim
Then communicate with the robot through three simple API calls:
from FR3Py.sim.interface import FR3IsaacSim
robot = FR3IsaacSim(robot_id='fr3')
images = robot.readCameras()
state = robot.getStates()
robot.sendCommands(cmd)
Note: The simulation scene and configuration can be changed through the modification of the FR3Py/sim/isaac/sim_config.yaml
file. Note that after modification, the package must be installed again through ./fr3py.sh -i
.