Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ A simple interface that prints the teleop responses. You can use it as a referen
python3 -m teleop.basic
```

### xArm

Interface to teleoperate the [uFactory Lite 6](https://www.ufactory.cc/lite-6-collaborative-robot/) robot.
Minor changes are probably necessary to support other xArm robots.

```bash
python3 -m teleop.xarm
```

Note that the interface is very simple, it doesn't implement any kind of filtering.
Therefore, you probably want to teleoperate it with a device with high frequency.
Smart phones are typically 30fps while VR joysticks 90fps which is much more preferable for teleoperation without filtering.

### ROS 2 Interface

The ROS 2 interface is designed primarily for use with the [cartesian_controllers](https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers) package, but it can also be adapted for [MoveIt Servo](https://moveit.picknik.ai/main/doc/examples/realtime_servo/realtime_servo_tutorial.html) or other packages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ def __init__(self):
self.__jacobi = JacobiRobot(file.name, ee_link="wrist_3_link")

# Initialize the arm motors and encoders.
timestep = int(self.getBasicTimeStep())
self.timestep = int(self.getBasicTimeStep())
for joint_name in self.__jacobi.get_joint_names():
motor = self.getDevice(joint_name)
motor.setVelocity(1.0)
position_sensor = motor.getPositionSensor()
position_sensor.enable(timestep)
position_sensor.enable(self.timestep)
self.__motors[joint_name] = motor

def move_to_position(self, pose):
self.__jacobi.servo_to_pose(pose)
self.__jacobi.servo_to_pose(pose, dt=self.timestep / 1000.0)
for name, motor in self.__motors.items():
motor.setPosition(self.__jacobi.get_joint_position(name))

Expand All @@ -40,7 +40,7 @@ def get_current_pose(self):

def main():
robot = RobotArm()
teleop = Teleop()
teleop = Teleop(natural_phone_orientation_euler=[0, 0, 0])
target_pose = None

def on_teleop_callback(pose, message):
Expand Down
4 changes: 2 additions & 2 deletions examples/webots/worlds/.teleop.wbproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Webots Project File version R2023b
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000000000000000000000010000012400000391fc0200000001fb0000001400540065007800740045006400690074006f00720000000016000003910000008900ffffff0000000300000d7000000042fc0100000002fb0000000e0043006f006e0073006f006c00650100000000000006900000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000d700000006900ffffff00000d70000004f000000001000000020000000100000008fc00000000
Webots Project File version R2025a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000000000000000000000010000012400000391fc0200000001fb0000001400540065007800740045006400690074006f00720000000016000003910000008900ffffff00000003000004f400000039fc0100000002fb0000000e0043006f006e0073006f006c00650100000000000006900000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c0100000000000004f40000006900ffffff000004f40000017800000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff000000010000000200000133000006470100000002010000000100
sceneTreePerspectives: 000000ff00000001000000030000001c000000c0000000fa0100000002010000000200
maximizedDockId: -1
Expand Down
15 changes: 8 additions & 7 deletions examples/webots/worlds/teleop.wbt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#VRML_SIM R2023b utf8
#VRML_SIM R2025a utf8

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/floors/protos/Floor.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/robots/universal_robots/protos/UR5e.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/tables/protos/Table.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/appearances/protos/CementTiles.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/floors/protos/Floor.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/robots/universal_robots/protos/UR5e.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/tables/protos/Table.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/appearances/protos/CementTiles.proto"

WorldInfo {
basicTimeStep 10
}
Viewpoint {
orientation 0.12086428145072244 0.9228327289041858 -0.36574797324476627 0.6877052442483729
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@

setup(
name="teleop",
version="0.0.9",
packages=["teleop", "teleop.basic", "teleop.ros2", "teleop.utils", "teleop.ros2_ik"],
version="0.1.0",
packages=["teleop", "teleop.basic", "teleop.ros2", "teleop.utils", "teleop.ros2_ik", "teleop.xarm"],
long_description=long_description,
long_description_content_type="text/markdown",
description="Turns your phone into a robot arm teleoperation device by leveraging the WebXR API",
install_requires=[
"Flask",
"Flask-SocketIO",
"fastapi",
"uvicorn[standard]",
"numpy",
"transforms3d",
"werkzeug",
"pytest",
"requests",
"websocket-client",
],
extras_require={
"utils": ["pin"],
},
package_data={
"teleop": ["cert.pem", "key.pem", "index.html"],
"teleop": ["cert.pem", "key.pem", "index.html", "teleop-ui.js"],
},
license="Apache 2.0",
author="Spes Robotics",
Expand Down
Loading