I was having trouble running some basic files from my Stretch RE2 so I decided to give it a clean install and run the stretch_install instructions found here:
Everything was going smoothy until I ran RE1_migrate_contacts.py where I encounter this error:
Attempting migration of contact data for robot stretch-re2-2006. Proceed? [y/N]: y
Backing up /home/hello-robot/stretch_user/stretch-re2-2006/stretch_user_params.yaml to stretch_user_params.contact_migration_backup.20230519135558.yaml
Backing up /home/hello-robot/stretch_user/stretch-re2-2006/stretch_configuration_params.yaml to stretch_configuration_params.contact_migration_backup.20230519135558.yaml
Traceback (most recent call last):
File â/home/hello-robot/.local/bin/RE1_migrate_contacts.pyâ, line 56, in
param_mgmt.migrate_contact_params_RE1V0(fleet_path, fleet_id)
File â/home/hello-robot/.local/lib/python3.8/site-packages/stretch_factory/param_mgmt.pyâ, line 152, in migrate_contact_params_RE1V0
C1, m1 = convert_joint_contact_thresh(âhello-motor-armâ,âarmâ,N,C,C[âarmâ][âi_feedforwardâ])
KeyError: âi_feedforwardâ
Hey @Rafael_MM, given that you are reinstalling a Ubuntu 20.04 installation on your RE2, you shouldnât need to run the RE1 migration tool, or RE1_migrate_contacts.py. That tool is intended for users upgrading their RE1 from Ubuntu 18.04 to 20.04. If you run a stretch_robot_system_check.py, does it ask you to run the migration tool?
/home/hello-robot/.local/lib/python3.8/site-packages/trimesh/voxel/runlength.py:205: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
_ft = np.array([False, True], dtype=np.bool)
Traceback (most recent call last):
File "/home/hello-robot/.local/bin/stretch_robot_system_check.py", line 4, in <module>
import stretch_body.robot as robot
File "/home/hello-robot/.local/lib/python3.8/site-packages/stretch_body/robot.py", line 20, in <module>
from stretch_body.robot_collision import RobotCollision
File "/home/hello-robot/.local/lib/python3.8/site-packages/stretch_body/robot_collision.py", line 5, in <module>
import urdfpy
File "/home/hello-robot/.local/lib/python3.8/site-packages/urdfpy/__init__.py", line 1, in <module>
from .urdf import (URDFType,
File "/home/hello-robot/.local/lib/python3.8/site-packages/urdfpy/urdf.py", line 9, in <module>
import trimesh
File "/home/hello-robot/.local/lib/python3.8/site-packages/trimesh/__init__.py", line 34, in <module>
from . import voxel
File "/home/hello-robot/.local/lib/python3.8/site-packages/trimesh/voxel/__init__.py", line 1, in <module>
from .base import VoxelGrid
File "/home/hello-robot/.local/lib/python3.8/site-packages/trimesh/voxel/base.py", line 11, in <module>
from . import morphology
File "/home/hello-robot/.local/lib/python3.8/site-packages/trimesh/voxel/morphology.py", line 4, in <module>
from . import encoding as enc
File "/home/hello-robot/.local/lib/python3.8/site-packages/trimesh/voxel/encoding.py", line 7, in <module>
from . import runlength as rl
File "/home/hello-robot/.local/lib/python3.8/site-packages/trimesh/voxel/runlength.py", line 205, in <module>
_ft = np.array([False, True], dtype=np.bool)
File "/home/hello-robot/.local/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
update:
I uninstalled and re installed numpy and it seems to be working now here is what I got when running stretch_robot_system_check.py
hello-robot@stretch-re2-2006:~$ stretch_robot_system_check.py
/home/hello-robot/.local/lib/python3.8/site-packages/scipy/__init__.py:155: UserWarning: A NumPy version >=1.18.5 and <1.25.0 is required for this version of SciPy (detected version 1.17.4
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
For use with S T R E T C H (R) RESEARCH EDITION from Hello Robot Inc.
---------------------------------------------------------------------
---- Checking Devices ----
[Pass] : hello-wacc
[Pass] : hello-motor-left-wheel
[Pass] : hello-pimu
[Pass] : hello-lrf
[Pass] : hello-dynamixel-head
[Pass] : hello-dynamixel-wrist
[Pass] : hello-motor-arm
[Pass] : hello-motor-right-wheel
[Pass] : hello-motor-lift
[Pass] : hello-respeaker
---- Checking Pimu ----
[Pass] Voltage = 12.463527917861938
[Pass] Current = 3.4872635322458603
[Pass] Temperature = 28.014796666609936
[Pass] Cliff-0 = -0.13037109375
[Pass] Cliff-1 = 5.56610107421875
[Pass] Cliff-2 = 11.3350830078125
[Pass] Cliff-3 = 11.32025146484375
[Pass] IMU AZ = -9.856385231018066
[Pass] IMU Pitch = -1.7265985012054443
[Pass] IMU Roll = 2.2036590576171875
---- Checking EndOfArm ----
[Pass] Ping of: stretch_gripper
[Pass] Calibrated: stretch_gripper
[Pass] Ping of: wrist_yaw
[Pass] Calibrated: wrist_yaw
---- Checking Head ----
[Pass] Ping of: head_pan
[Pass] Ping of: head_tilt
---- Checking Wacc ----
[Pass] AX = 9.598865509033203
---- Checking hello-motor-left-wheel ----
[Pass] Position = -2.6745426654815674
---- Checking hello-motor-right-wheel ----
[Pass] Position = 2.981022357940674
---- Checking hello-motor-arm ----
[Pass] Position = 14.579084396362305
[Pass] Position Calibrated = True
---- Checking hello-motor-lift ----
[Pass] Position = 62.82505416870117
[Pass] Position Calibrated = True
---- Checking for Intel D435i ----
Bus 004 Device 002: ID 8086:0b3a Intel Corp. Intel(R) RealSense(TM) Depth Camera 435i
[Pass] : Device found
Hi @Rafael_MM, it looks like your system check is all passing, so the hardware/software is ready to go!
For RE2, those migration tools arenât necessary to run, so I plan to update the linked docs noting this. As for the Numpy issue, updating to the latest version solved it. To get rid of the Scipy warning, you can update it to the latest version as well using pip3 install -U scipy.