From de2cc0fdf60427ee6693b5129df62c1e9c67c8ca Mon Sep 17 00:00:00 2001 From: Hannes Braun Date: Fri, 5 Mar 2021 16:28:44 +0100 Subject: [PATCH] Prevent losing orientation by limiting NeckPitch --- CHANGELOG.md | 4 ++++ README.md | 2 +- pom.xml | 2 +- src/main/java/magma/fatproxy/MagmaFatProxy.java | 2 +- .../magma/robots/nao/model/agentmeta/NaoAgentMetaModel.java | 4 +++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e3bd5..65b6294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +1.2.2 (March 5, 2021) +------------------------------ +* Prevent losing orientation by limiting the maximum NeckPitch angle to zero degrees + 1.2.1 (February 1, 2021) ------------------------------ * Fixed setting playmode during MonitorKick diff --git a/README.md b/README.md index ebb1fea..c7553f6 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ It should be compatible with older JREs, too, but this is not verified. - Make sure you have Java installed and available on your command line. ### Getting the prebuilt version -We provide a prebuilt version of the Fat Proxy. You can download the latest version from the [Releases page](https://github.com/magmaOffenburg/magmaFatProxy/releases) (e.g. `magmafatproxy-1.2.1.zip`). The Zip file contains the JAR file as well as the start script. +We provide a prebuilt version of the Fat Proxy. You can download the latest version from the [Releases page](https://github.com/magmaOffenburg/magmaFatProxy/releases) (e.g. `magmafatproxy-1.2.2.zip`). The Zip file contains the JAR file as well as the start script. ### Building from source - Clone the repository: `git clone https://github.com/magmaOffenburg/magmaFatProxy`. diff --git a/pom.xml b/pom.xml index edb1a8d..cc4c17a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ magmaoffenburg magmafatproxy jar - 1.2.1 + 1.2.2 magmaFatProxy https://github.com/magmaOffenburg/magmaFatProxy diff --git a/src/main/java/magma/fatproxy/MagmaFatProxy.java b/src/main/java/magma/fatproxy/MagmaFatProxy.java index 7a74dc4..09bb6cf 100644 --- a/src/main/java/magma/fatproxy/MagmaFatProxy.java +++ b/src/main/java/magma/fatproxy/MagmaFatProxy.java @@ -28,7 +28,7 @@ */ public class MagmaFatProxy { - private static final String PROXY_VERSION = "1.2.1"; + private static final String PROXY_VERSION = "1.2.2"; /** * Instantiates and starts the Simspark agent proxy. diff --git a/src/main/java/magma/robots/nao/model/agentmeta/NaoAgentMetaModel.java b/src/main/java/magma/robots/nao/model/agentmeta/NaoAgentMetaModel.java index 486b30e..ee3ef6b 100644 --- a/src/main/java/magma/robots/nao/model/agentmeta/NaoAgentMetaModel.java +++ b/src/main/java/magma/robots/nao/model/agentmeta/NaoAgentMetaModel.java @@ -68,9 +68,11 @@ NeckYaw, NeckYawP, NeckYawE, new Vector3D(0, 0, 1), -120, 120, MAX_JOINT_SPEED, Vector3D.ZERO, null, null, null, null, null); configs.add(currentConfig); + // The max joint angle is actually 45 degrees + // However, it is limited to 0 degrees in order to prevent losing orientation by looking upwards currentConfig = new BodyPartConfiguration(Head, Neck, new Vector3D(0, 0, 0.065), 0.35f, new Vector3D(0.13, 0.13, 0.13), - new HingeJointConfiguration(NeckPitch, NeckPitchP, NeckPitchE, new Vector3D(1, 0, 0), -45, 45, + new HingeJointConfiguration(NeckPitch, NeckPitchP, NeckPitchE, new Vector3D(1, 0, 0), -45, 0, MAX_JOINT_SPEED, false), new Vector3D(0, 0, -0.005), null, null, null, null, null); configs.add(currentConfig);