diff --git a/README.md b/README.md index 9ffb3d8e..4b4d6930 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ The simulation is based on the open source robot simulator *Webots*. The applica * Website: https://cyberbotics.com/#cyberbotics * Github: https://github.com/cyberbotics/webots +* Compatible webots versions: + * v2023a + * v2023b ## Intallation @@ -76,6 +79,7 @@ Platformio project tasks --> WebotsSim --> Build | Library | Description | License | | - | - | - | | [Zumo32U4 library](https://github.com/pololu/zumo-32u4-arduino-library) | Provides access to the Zumo32U4 hardware. | MIT | +| [SerialMuxProt](https://github.com/gabryelreyes/SerialMuxProt) | Multiplexing Communication Protocol | MIT | # Issues, Ideas And Bugs If you have further ideas or you found some bugs, great! Create a [issue](https://github.com/BlueAndi/RadonUlzer/issues) or if you are able and willing to fix it by yourself, clone the repository and create a pull request. diff --git a/lib/HALSim/Keyboard.h b/lib/HALSim/Keyboard.h index 1f7af3c8..77dbb5ac 100644 --- a/lib/HALSim/Keyboard.h +++ b/lib/HALSim/Keyboard.h @@ -43,6 +43,7 @@ /****************************************************************************** * Includes *****************************************************************************/ +#include #include #include diff --git a/lib/Service/RelativeEncoders.h b/lib/Service/RelativeEncoders.h index c00414ee..591d583a 100644 --- a/lib/Service/RelativeEncoders.h +++ b/lib/Service/RelativeEncoders.h @@ -71,8 +71,8 @@ class RelativeEncoders */ RelativeEncoders(IEncoders& absEncoders) : m_absEncoders(absEncoders), - m_referencePointLeft(m_absEncoders.getCountsLeft()), - m_referencePointRight(m_absEncoders.getCountsRight()), + m_referencePointLeft(0), + m_referencePointRight(0), m_lastRelEncoderStepsLeft(0), m_lastRelEncoderStepsRight(0) { diff --git a/platformio.ini b/platformio.ini index 2516c599..711da412 100644 --- a/platformio.ini +++ b/platformio.ini @@ -107,7 +107,6 @@ extra_scripts = pre:./scripts/add_os_specific_build_flags.py pre:./scripts/create_webots_library.py post:./scripts/copy_webots_shared_libs.py - post:./scripts/copy_track_file.py ; ***************************************************************************** ; PC target environment for tests diff --git a/scripts/copy_track_file.py b/scripts/copy_track_file.py deleted file mode 100644 index a710d940..00000000 --- a/scripts/copy_track_file.py +++ /dev/null @@ -1,50 +0,0 @@ -"""Provide track image to Webots.""" - -# MIT License -# -# Copyright (c) 2022 - 2023 Andreas Merkle (web@blue-andi.de) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -################################################################################ -# Imports -################################################################################ -import os -import shutil - -################################################################################ -# Variables -################################################################################ -dst_path_folder = os.getenv('WEBOTS_HOME') + '/projects/default/worlds/protos/' -SRC_PATH_FILE = './webots/track.png' - -################################################################################ -# Classes -################################################################################ - -################################################################################ -# Functions -################################################################################ - -################################################################################ -# Main -################################################################################ -if not os.path.isdir(dst_path_folder): - os.makedirs(os.path.dirname(dst_path_folder), exist_ok=True) - shutil.copy(SRC_PATH_FILE, dst_path_folder) diff --git a/webots/protos/Zumo32U4.proto b/webots/protos/Zumo32U4.proto index 9da32d8d..966a3dad 100644 --- a/webots/protos/Zumo32U4.proto +++ b/webots/protos/Zumo32U4.proto @@ -168,6 +168,9 @@ PROTO Zumo32U4 [ appearance DEF BODY_COLOR PBRAppearance { emissiveColor 0.2 0.2 0.2 } + geometry DEF BODY_GEOMETRY Box { + size 0.06 0.065 0.02 + } } Transform { translation 0.0325 0 0.0025 @@ -185,9 +188,7 @@ PROTO Zumo32U4 [ children [ Shape { appearance USE BODY_COLOR - geometry Box { - size 0.06 0.065 0.02 - } + geometry USE BODY_GEOMETRY } ] }