Software drop - September 6, 2024

Hey all,

Here’s a quick round-up of some of the new software that’s been released for Stretch this past few weeks.

Overtilt detection

For Stretch 3 robots, a new safety feature has been added to the firmware that can help prevent your robot from tipping itself over. It monitors IMU orientation and cliff sensor differentials at 1000hz to determine if the robot is at risk of falling over, and if so, it can activate runstop to cease the motion causing the tilt.

This feature doesn’t help if someone is trying to tip the robot over, but instead when the robot is exerting forces on its environment which are leading to an overtilt (e.g. autonomous code that commands the robot’s arm to push against a wall), the firmware can kick in and prevent the crash by stopping motion. While the feature is in beta, you will need to enable it. First update your firmware and Python libraries, then modify your user params like so:

pimu:
  config:
    stop_at_tilt: 1

In addition, the feature reports the kind of overtilt that is occurring. The mobile base has three points of contact with the ground (shown below as blue circles), yielding three sides over which the robot can be tilted over. The pimu.status['over_tilt_type'] dictionary element will contain one of ["Left Tilt", "Right Tilt", "Front Tilt", None], depending on the kind of tilt that was detected. Furthermore, the robot monitor will print it out to the console while your program is running.

image

Thread-safety Tutorial

If you’re wondering if Stretch’s low level driver library, “Stretch Body”, is thread-safe, then take a look at this new tutorial: Thread-safety Tutorial - Stretch Docs

The tutorial builds up to multithreading experiments with multiple “writers” sending commands to the robot from separate threads, as well as multiple “readers” reading the joint states from separate threads.

ROS2 Motion Commands Tutorial

We’ve added a quick tutorial on using the HelloNode class in Stretch’s ROS2 packages to send motion commands to the robot’s driver. The tutorial also details on how to query the robot’s joint limits from the driver. Tutorial: Motion Commands - Stretch Docs

Mujoco Robocasa

Stretch’s Mujoco simulation has received support for simulating different environments that the robot can interact with, thanks to Robocasa. Check out the getting started examples!

Fix for no-tool Gamepad Teleop

Thanks to @atyshka, the Gamepad Teleop CLI, stretch_gamepad_teleop.py, now supports tele-operating the robot when the gripper/tool is taken off the robot. Check out his PR here. Update your Python libraries to get this fix.

Fix for Library Installation

Thanks to Simon, a problematic and unmaintained dependency was removed from our Python libraries. This should make installations smoother. Check out his PR here. Update your Python libraries to get this fix.

Fix for Older Numpy in Web Teleop

You may have seen Numpy errors surrounding the use of np.int, np.bool, etc. because in recent versions of Numpy, these np.<primitive> types were deprecated in favor of using the built-in Python primitives. A fix for Stretch Web Teleop has been added to switch over to using the built-in primitives. Therefore, Stretch Web Teleop can now use newer versions of Numpy. Details in the PR here. Update your ROS Workspace to get this fix.

Fix for Invalid Nav2 Map

A common pitfall for new developers is giving the Nav2 launch file a bad path when attempting to specify the map to be used. In the past, Nav2 would continue on without the map, leading to greater errors when the robot attempted to navigate within the map later. To prevent this pitfall, the launch file now immediately errors out if the file path given doesn’t point to a valid map. Details in the PR here. Update your ROS Workspace to get this fix.

Fix for Funmap stowing

With Stretch 3’s quick-connect tool changer, it’s easy to swap out the tool on your robot. Ideally, the stowing configuration you define for your tool should be used in other software. Now, there’s a /stow_the_robot ROS2 service, which makes it easy for other software to call your tool’s stowing routine. In this fix, the FUNMAP library replaces an older hardcoded routine with the /stow_the_robot service. Details in the PR here. Update your ROS Workspace to get this fix.

2 Likes