From 5d7fd5014e3eb0831a270b57f5b8f7783787fc47 Mon Sep 17 00:00:00 2001 From: DocGarbanzo <47540921+DocGarbanzo@users.noreply.github.com> Date: Fri, 16 Dec 2022 21:43:46 +0000 Subject: [PATCH] Rebased on main and bumped version (#1069) Fix imu input in the complete template. The imu keras part expects an array for the imu data. --- donkeycar/templates/complete.py | 14 ++++++++++---- setup.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/donkeycar/templates/complete.py b/donkeycar/templates/complete.py index 57a7426cd..8001ab995 100644 --- a/donkeycar/templates/complete.py +++ b/donkeycar/templates/complete.py @@ -371,10 +371,16 @@ def reload_weights(filename): elif model_type == "imu": assert cfg.HAVE_IMU, 'Missing imu parameter in config' - # Run the pilot if the mode is not user. - inputs = ['cam/image_array', - 'imu/acl_x', 'imu/acl_y', 'imu/acl_z', - 'imu/gyr_x', 'imu/gyr_y', 'imu/gyr_z'] + + class Vectorizer: + def run(self, *components): + return components + + V.add(Vectorizer, inputs=['imu/acl_x', 'imu/acl_y', 'imu/acl_z', + 'imu/gyr_x', 'imu/gyr_y', 'imu/gyr_z'], + outputs=['imu_array']) + + inputs = ['cam/image_array', 'imu_array'] else: inputs = ['cam/image_array'] diff --git a/setup.py b/setup.py index 5270bba37..06e809865 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def package_files(directory, strip_leading): long_description = fh.read() setup(name='donkeycar', - version="4.4.2-main", + version="4.4.3-main", long_description=long_description, description='Self driving library for python.', url='https://github.com/autorope/donkeycar',