Hii- I have a use case where i want to operate the robot remotely situated at a different location using gamepad controller and view the camera feed on the screen remotely.
Stretch3 has a web browser to where we can view the camera feed and control the robot by clicking on the buttons in the screen. Is it possible that I could connect the gamepad to my laptop remotely and control the robot from different location through it.
Hi @vipul, Yes you should be able to control the robot using the Gamepad controller from a remote computer in the network using the newly added feature Gamepad Mode to the ROS2 stretch_driver.
You can activate Gamepad Mode by calling the /switch_to_gamepad_mode service when the stretch driver is running.
ros2 service call /switch_to_gamepad_mode std_srvs/srv/Trigger
In this mode, stretch driver listens to /gamepad_joy topic for a valid Joy-type message. The Joy message formats and helper functions are provided in the gamepad_conversion.py
You can run the remote_gamepad.py node on your remote computer in the network with the provided gamepad USB dongle plugged in, and control the robot using the ROS2 drivers.
Here are the steps I have summarised for you to use Gamepad Mode with the Stretch Web Teleop interface running so you can see the camera streams in the browser:
First on the robot, start the Web interface
# Robot side
cd ~/ament_ws/src/stretch_web_teleop/
./launch_interface.sh
Install Stretch Body python package in the remote computer
Thanks @Mohamed_Fazil that did work, with this setup I can teleop the robot with gamepad on remote computer. Is there a way to get the camera feed as well on the remote computer while running the teleop through gamepad?
@vipul Glad you are able to do remote gamepad teleop now. For viewing the camera streams, I assumed you had launched the Stretch Driver node by launching the web interface pointed out in the first step. You can use the browser to see all the camera feeds through the Web Interface UI using the URL printed while you launched the interface and keep controlling the robot using the gamepad in gamepad mode from remote computer.
Note: Currently, the motion buttons in the Web Interface UI donât work when youâre in gamepad mode.
@Mohamed_Fazil Thank you! That worked out completely fine. Also I was wondering if the stretch can send camera views to a VR headset and can be controlled from there ? Any resources would be helpful.
@vipul We donât have any work from us to do a VR teleop of the robot. But we can provide you with resources from our robot side software to enable you to build your own VR teleop project if you are interested. For example, we have this Pythonic Stretch Dex Teleop demo, which allows you to do 6 DOF End-effector control and you can go way up into integrating it into a VR.