Coder Social home page Coder Social logo

hulks / hulk Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 49.0 44.95 MB

All your base are belong to us!

Home Page: https://hulks.de/hulk

License: GNU General Public License v3.0

Python 6.16% CMake 0.20% Shell 0.28% C++ 2.52% C 0.01% Dockerfile 0.04% Rust 87.35% JavaScript 1.67% HTML 0.09% CSS 0.26% Lua 1.27% Nix 0.14%

hulk's People

Contributors

ahasselbring avatar anesssi avatar anna566 avatar bendodroid avatar fyor avatar h3ndrk avatar ichbinjosi avatar jonasholz avatar jonathan-hellwig avatar julianschuler avatar knoellle avatar konradmoesch avatar larskna avatar lisaschulz97 avatar maikre avatar meiimoon avatar narcha avatar oleflb avatar pakonro avatar pasgl avatar patrickgoettsch avatar pejotejo avatar rakonn avatar rkost avatar schluis avatar schmidma avatar thagonduarte avatar tuxbotix avatar vivituhh avatar workshophulk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hulk's Issues

tools / ctc-hulks compiling error

I compiled three times according to the instructions in Ubuntu 18.04 Ubuntu 17 Ubuntu 16.04

It's all compiling / tools / ctc-hulks and it's the same error

Root@star:/HULKs CodeRelease-master/tools/ctc-hulks#. /3-build-libs

3-build-libs: Line 11: / HULKs Code Release-master/tools/ctc-hulks/x-tools/i686-nao-linux-gnu/bin/i686-nao-linux-gnu-gcc: No file or directory

. / 3-build-libs: Line 17: cd: bzip2-1.0.6: No file or directory

Make: *** No rule to make target'libbz2.a'. Stop it.

Install: Cannot get the file status of'libbz2.a'(stat): No file or directory

Install: Cannot get the file status of'bzlib.h'(stat): No file or directory

Make: *** No rule to make target'clean'. Stop it.

Make: Makefile-libbz2_so: No file or directory

Make: *** No rule to make target'Makefile-libbz2_so'. Stop it.

Install: Cannot get the file status of'libbz2.so.1.0.6'(stat): No file or directory

Finished bzip2. Continue? [y/n] y

. / 3-build-libs: Line 29: cd: zlib-1.2.11: No file or directory

. / 3-build-libs: Line 30:. / configure: No file or directory

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished zlib. Continue? [y/n] y

. / 3-build-libs: Line 37: cd: libpng-1.6.34: No file or directory

. / 3-build-libs: Line 38:. / configure: No file or directory

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished libpng. Continue? [y/n] y

. / 3-build-libs: Line 48: cd: libjpeg-turbo-1.5.3: No file or directory

Autoreconf:'configure.ac'or'configure.in' is required

. / 3-build-libs: Line 50:. / configure: No file or directory

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished libjpeg. Continue? [y/n] y

. / 3-build-libs: Line 60: cd: boost_1_66_0/tools/build: No file or directory

Can't find file to patch at input line 5

Perhaps you used the wrong-p or -- strip option?

The text leading up to this was:

------------------------------------------------------------------------------------------------------------------------------

| diff -- git a/src/build/ac.jam b/src/build/ac.jam

| index c6e36c6..C01dc59 100644

| - a/src/build/ac.jam

|+++ b/src/build/ac.jam

------------------------------------------------------------------------------------------------------------------------------

File to patch:

Skip this patch? [y]y

Skipping patch.

2 out of 2 hunks ignored

. / 3-build-libs: Line 62:. / bootstrap. sh: No file or directory

. / 3-build-libs: Line 63:. / b2: No file or directory

. / 3-build-libs: Line 67: / HULKs Code Release-master/tools/ctc-hulks/libs/boost-build/bin/b2: No file or directory

Finished boost. Continue? [y/n] y

CMake Error: The source directory "/ flann-1.9.1" does not exist.

Specify -- help for usage, or press the help button on the CMake GUI.

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished flann. Continue? [y/n] y

. / 3-build-libs: Line 88: cd: eigen-3.3.4: No file or directory

Can't find file to patch at input line 3

Perhaps you used the wrong-p or -- strip option?

The text leading up to this was:

------------------------------------------------------------------------------------------------------------------------------

| - a/unsupported/test/CMakeLists.txt Tue Feb 21 14:36:34 2017+0100

|+++ b/unsupported/test/CMakeLists.txt Wed Feb 2202:55:35 2017+0100

------------------------------------------------------------------------------------------------------------------------------

File to patch:

Skip this patch? [y]y

Skipping patch.

2 out of 2 hunks ignored

CMake Error: The source directory "/ eigen-3.3.4" does not exist.

Specify -- help for usage, or press the help button on the CMake GUI.

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished Eigen. Continue? [y/n] y

. / 3-build-libs: Line 106: cd: alsa-lib-1.1.5: No file or directory

. / 3-build-libs: Line 107:. / configure: No file or directory

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished alsa. Continue? [y/n] y

CMake Error: The source directory "/ portaudio-v190600_20161030" does not exist.

Specify -- help for usage, or press the help button on the CMake GUI.

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished portaudio. Continue? [y/n] y

. / 3-build-libs: Line 130: cd: libsndfile-1.0.28: No file or directory

. / 3-build-libs: Line 131:. / configure: No file or directory

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished libsndfile. Continue? [y/n]y

. / 3-build-libs: Line 140: cd: fftw-3.3.7: No file or directory

. / 3-build-libs: Line 141:. / configure: No file or directory

Make: *** No target was specified and makefile could not be found. Stop it.

Make: *** No rule to make target'install'. Stop it.

Finished fftw. Continue? [y/n] y

Can you help me?....If you can I would be very appreciate!

Incomplete configuration manual

You need to fill in your teamnumber into multiple files in order for (at least) robotSim to work, one of which isn't mentioned in the teamreport (checked by Ctr+F).

The file in question:
HULKsCodeRelease/home/configuration/location/default/head/default/Brain.json
Content:

{
    "general.teamNumber": YOUR_TEAM_NUMBER_HERE,
    "general.port": 100YOUR_TEAM_NUMBER_HERE,
    "behavior.playerRole": "player",
    "behavior.initialPoses": [ -3, -2, -1, -1, -2, -3 ]
}

Fixing it was trivial, finding it was not.

Add facility for Joint Calibration

We've noticed that multiple robots are experiencing wear n tear, including but not limited to head yaw offsets, body-roll offsets, etc.

While some could be corrected by introducing a "torso" calibration matrix, it would be nice to be able to individually add/ compensate an offset from joints.

(ie: Nao 30 after a bunch of remote games has 4~ deg of pitch in both cameras and that's the only offset. Also in some Naos, I felt more backlash (getting close to old V5 levels)

Reference from C++
https://github.com/HULKs/nao/blob/cpp/src/Motion/JointCalibrationProvider/JointCalibrationProvider.hpp

(Originally at: https://github.com/HULKs/nao/issues/4044)

Compiler segfaults for target nao

For documentation of communication by email

In arch, using a kernel version higher than 4.14.15-1, compiling for target nao does not work. This also appears to happen on newer Debian systems:

gdb of the problematic make command:

gdb /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/cross/bin/i686-aldebaran-linux-gnu-g++
GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/cross/bin/i686-aldebaran-linux-gnu-g++...(no debugging symbols found)...done.
(gdb) set follow-fork-mode child
(gdb) run -DBOOST_NO_DEFAULTED_FUNCTIONS -DBOOST_PARAMETER_MAX_ARITY=7 -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -DtuhhALModule_EXPORTS -I/home/[...]/Workspaces/hulks/nao/src/tuhhsdk/Hardware/Nao/../.. -isystem /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/libnaoqi/include/boost-1_55 -isystem /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/libnaoqi/include  -DI_AM_A_ROBOT --sysroot /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/cross/i686-aldebaran-linux-gnu/sysroot/ -pipe -fomit-frame-pointer -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -m32 -mtune=atom -mssse3 -mfpmath=sse   -DI_AM_A_ROBOT --sysroot /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/cross/i686-aldebaran-linux-gnu/sysroot/ -pipe -fomit-frame-pointer -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -m32 -mtune=atom -mssse3 -mfpmath=sse -std=gnu++0x -Wall -Wextra -pedantic -O2 -DNDEBUG -fPIC   -o CMakeFiles/tuhhALModule.dir/home/[...]/Workspaces/hulks/nao/src/tuhhsdk/Definitions/keys.cpp.o -c /home/[...]/Workspaces/hulks/nao/src/tuhhsdk/Definitions/keys.cpp
Starting program: /home/[...]/Workspaces/hulks/toolchain/ctc-linux64-atom-2.1.4.13/cross/bin/i686-aldebaran-linux-gnu-g++ -DBOOST_NO_DEFAULTED_FUNCTIONS -DBOOST_PARAMETER_MAX_ARITY=7 -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -DtuhhALModule_EXPORTS -I/home/[...]/Workspaces/hulks/nao/src/tuhhsdk/Hardware/Nao/../.. -isystem /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/libnaoqi/include/boost-1_55 -isystem /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/libnaoqi/include  -DI_AM_A_ROBOT --sysroot /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/cross/i686-aldebaran-linux-gnu/sysroot/ -pipe -fomit-frame-pointer -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -m32 -mtune=atom -mssse3 -mfpmath=sse   -DI_AM_A_ROBOT --sysroot /home/[...]/Workspaces/hulks/nao/toolchain/naoqi/cross/i686-aldebaran-linux-gnu/sysroot/ -pipe -fomit-frame-pointer -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -m32 -mtune=atom -mssse3 -mfpmath=sse -std=gnu++0x -Wall -Wextra -pedantic -O2 -DNDEBUG -fPIC   -o CMakeFiles/tuhhALModule.dir/home/[...]/Workspaces/hulks/nao/src/tuhhsdk/Definitions/keys.cpp.o -c /home/[...]/Workspaces/hulks/nao/src/tuhhsdk/Definitions/keys.cpp
[New process 20374]
process 20374 is executing new program: /home/[...]/Workspaces/hulks/toolchain/ctc-linux64-atom-2.1.4.13/cross/libexec/gcc/i686-aldebaran-linux-gnu/4.5.3/cc1plus

Thread 2.1 "cc1plus" received signal SIGSEGV, Segmentation fault.
[Switching to process 20374]
0xffffffffff600000 in ?? ()
(gdb) backtrace
#0  0xffffffffff600000 in ?? ()
#1  0x0000000000cf9cad in ?? ()
#2  0x00000000006fcb34 in ?? ()
#3  0x0000000000cb3e3e in ?? ()
#4  0x0000000000400389 in ?? ()
#5  0x00007fffffffd678 in ?? ()
#6  0x0000000000000000 in ?? ()

Pepsi check image version

Pepsi should check whether the version of the image on a target NAO is the one that was expected before uploading.
If it isn't, either issue a warning or fail the operation (with an additional option to override).

Communication improvements

  • Try to get rid of #[derive(Default)] for most of the types
  • Make StoreToDisk more intelligent or give client more control into which file and in which variant to store back. Currently, multiple stores may grow the head configuration file in the location without need because we cannot detect easily which items to discard.
  • Only send updates to subscribed clients if the values actually changed.
  • Document Communication design (refinement needed):
    • Messages
      • Requests are always textual, binary requests are protocol errors
      • At least within textual stream, messages are in order
      • Each sent data frame contains all textual data of this frame and binary references
        • This allows to have the binary stream separate and only the order in the textual stream matters
      • When the client subscribes, the request's id is used to store the subscription, unsubscribe in the future, and receive updated data from the server
      • Clients must specify with which cycler instance they want to speak
    • Databases
      • Clients choose subscription IDs, they need to be prefixed with a unique client identifier (e.g. peer address)
      • These asynchronous tasks exist: provider n--1 router 1--1 receiver/sender
        • Single router demultiplexes to provider
        • Each connected cycler instance spawns a provider task
      • Each provider task stores subscriptions
      • All provider tasks and the receiver tasks can send requests to the router
      • The provider first registers itself at the router
      • GetNext and Subscribe ids are shared and need to be unique
    • Parameters
      • framework configuration parsing (directory parsing based on hardware ids)
      • run(path), Runtime::start(path, amount_of_slots), Runtime::get_parameters_reader()
      • communication encapsulates multiple buffering creation
      • subscriptions, whole parameters: updating/writing/notifications/data state
      • path, target (default, location, body in default, head in default, body in location, head in location)
      • with SerializeHierarchy
      • if path.is_empty() { serde_json::to_value(parameters) } else { parameters.serialize_hierarchy() }
        • integrate this into SerializeHierarchy?
      • merge value into larger JSON object
      • diff + highest priority JSON

Installation produces cp and rm errors.

Either ./2-setup-libs or ./3-build-toolchain produces this message at the end or beginning respectively.

cp: cannot stat '~/HULKsCodeRelease/tools/ctc-hulks/x-tools/i686-nao-linux-gnu/i686-nao-linux-gnu/debug-root/data/x-tools/i686-nao-linux-gnu/i686-nao-linux-gnu/sysroot/usr/include/*': No such file or directory
rm: cannot remove '~/HULKsCodeRelease/tools/ctc-hulks/x-tools/i686-nao-linux-gnu/i686-nao-linux-gnu/debug-root/data': No such file or directory

It doesn't seem to break anything, it just makes me nervous.

Improve `types` crate

  • Group types in types crate better according to domain
  • Improve naming in general, make it more consistent (e.g. parameters, filters, data types, etc.)
  • Remove unused types

Behavior Simulator Rewrite

Build a new behavior simulator. The previous version broke with the recent framework changes.

Basic idea:

Testing behavior is cumbersome.
Webots is very slow and and only simulates one robot.
Real robots are cumbersome to handle, especially when testing alone and/or with more than 1-2 robots.
A dedicated behavior simulator should solve this problem, allowing us to test behavior decisions and communication between robots in an easily repeatable manner.
For a given scenario file with a list of external events, the behavior simulator should output a state dump for every cycle.

Interfacing with nodes:

Motion should be faked, i.e. when behavior request walking forward, the simulator simply advances the robots position.
Vision data such as ball position and self-location can be taken directly from the simulated environment, optionally with some (ideally deterministic) noise applied.
Communication between robots can also be done either directly or with simulated delay/jitter, packet loss, etc.

Scenarios

The behavior simulator should be able to load files with scenarios and simulate the whole scenario as fast as possible.
For every simulation step, a dump of the whole control database for every cycle with all AdditionalOutputs enabled should be saved.
These "frames" can then be inspected retroactively with twix for example, jumping back and forth in the timeline without having to simulate anything.

Scenarios could also contain conditions that have to be fulfilled at certain points in time for automatic behavior testing.
These conditions could include:

  • Goal scored after at most X time steps
  • At most N robots within certain region (for testing kick-off/kick-in/illegal defender rules)
  • ...

Events

Any external factors that influence the game should be simulatable.

  • Game controller messages
    • Goal scored
    • Robot (un-)penalized
    • ...
  • Physical events
    • Ball teleports
    • Ball gains momentum (kicked by fake opponent)
    • Robot falls
  • Miscellaneous
    • Whistle blown

Previous version

The old behavior simulator is a rust program which can be found at src/behavior_simulator.
It would output a json file that would then be compiled into a react application at tools/sprite.
This architecture of having two separate programs is simple, but that doesn't mean the new version has to follow the same.
The viewer could be integrated directly into twix for example, or perhaps both simulation and timeline control could be done by a standalone application that allows editing the scenario, recalculating the frames after a changed event on the fly. Feel free to experiment.

Some miscellaneous things to consider:

  • should support up to 7 players (per side)
  • Opponents. Either seperately simulated hulks or statically defined in scenario.
  • Penalties
  • Simulate fallen states/standup time
  • (In-walk-)kicks

[META] Make Documentation great (again)

Introduction

Setup

Framework

Tooling

Operating System

Robotics

  • Perception
  • Behavior @PasGl
    • World state -> Actions -> MotionCommand @PasGl
  • Motion
    • Step planning
    • Walking
    • Kicking
    • Motion files
      • Stand-up etc.
  • ...

Workflow

  • Development workflow
    • Coding Style
    • GitHub
      • CI
      • Board
    • Meetings
      • Test games
    • Test-driven development
      • Simulator
  • Competition workflow
    • Meetings
    • Roles
  • ...

Robot Detection

We need a reliable way of detecting other robots via camera.
There already exists a classical robot detection that is based on finding clusters in image segments.

This approach works to detect vaguely robot-looking objects, but it isn't reliable enough to make behavior decisions. It also doesn't provide other useful information such as the jersey color (or at least whether it vaguely looks like the own-team-color), whether the robot is fallen or standing up, or the direction it is facing.

While extracting the jersey color and improving reliability are perhaps achievable by extending/tuning the current approach, we should also look into machine learning based approaches. A combined detection network for any of balls, robots, lines, etc. is also possible.

IIRC @tuxbotix already looked at some options regarding this.
Datasets of raw images recorded during previous events, some with labels and pre-built traing datasets for ball detection can be found at tools/machine-learning/data. The data can be retrieved from the bighulk in the lab via DVC.
During the team trip, @knoellle also has a copy of the DVC data on his laptop.

Investigate delays in twix

Currently there seems to be some delay when changing subscriptions in twix.
I.e. disconnecting from a robot you would keep receiving new data for a moment or switching bottom<->top camera, it would overlay bottom camera visuals over the new top camera image and vice versa.

HuLA formatting/clippy is not checked in CI

The cargo fmt only checks crates which are members of the root workspace.
HuLA (tools/hula) is explicitly excluded and not checked for formatting errors or clippy hints during CI checks.

There should be additional tasks or commands to check HuLA.

Robot does not move after upload

From #2 by @Heodel:

After I uploaded the robot software, the robot restarted. After I connected to SSH, I found that the hulk service was enabled, but when I studied B-Human, the robot was this time. Stateful, actionable. But HULK's service is on, my Nao robot has no action, can you tell me how can I get the robot to move?

`?` operator in optional path segments

Add documentation that optional single path elements still need a question mark at the end (otherwise ugly errors are generated, maybe add checks in context attribute?).

Can not changePlayerNumber

I meet an error when I run ./scripts/changePlayerNumber

this is my error message:

heodel@star:~/HULKsCodeRelease-master$ ./scripts/changePlayerNumber 12:4

Traceback (most recent call last):
File "./scripts/changePlayerNumber", line 85, in
change_player_numbers(naonumber_playernumber_dict)
File "./scripts/changePlayerNumber", line 71, in change_player_numbers
with open(brain_json_path, 'r') as file:
IOError: [Errno 2] No such file or directory: '/home/heodel/HULKsCodeRelease-master/scripts/../home/configuration/location/default/head/tuhhnao12/Brain.json'

I don't know why not have these files like head/tuhhnao12/Brain.json in my computer.

Finalize Flora -> Twix Migration

We have been exclusively supporting twix for a while now, leaving flora derelict.
Flora should be deleted but there are still some flora exclusive panels left.
Perhaps not all of them are necessary and some may be integrated into already existing panels.

Panels ported:

  • Audio spectrums (map layer)
    • should be easy to port and helps a lot with diagnosing whistle detection issues.
  • Ball candidates (image overlay)
  • Ball filter
  • Behavior (map layer?)
    • port/create with behavior for 7v7 games
  • Field border (image overlay)
  • Field color (implemented in image segments panel)
  • Horizon (image overlay)
  • Image segments
  • Line detection (image overlay)
  • Line fitting (map layer)
  • Localization (map layer)
  • Motion dispatching
  • Odometry
  • Parameters
  • Path planning (map layer)
  • Projected field lines (image overlay)
  • Projected limbs (image overlay)
  • Raw image
  • Raw output
  • Robot detection (image overlay)

Faster standup motion

Idea is to improve the current standup motions by replacing delays by stabilization periods. This will require substantial changes to the current keyframe format.

Test standup in lab.

Unable to compile for target simrobot

From #1 by @Heodel:

When I compile the SimRobot , I encountered an error in the cpp file , which is in the Motion section.
I compiled it four times and used the following instructions:

nao /scripts/compile -t simrobot -b <BUILD_TYPE>

The type I used as Develop Debug Release and RelWithDebInfo

This command is in section 2.4.3 of the manual book.

Below is my error log:

Heodel@star:~/HULKsCodeRelease-master$ ./scripts/compile -t simrobot -b Debug
-- Compiling for target simrobot with build type Debug.

[ 1%] Automatic moc for target tuhhSimRobot
[ 1%] Built target tuhhSimRobot_automoc
[ 13%] Built target Vision
[ 32%] Built target Motion
Scanning dependencies of target Brain
[ 33%] Building CXX object src/brain/CMakeFiles/Brain.dir/Knowledge/LandmarkFilter/LandmarkFilter.cpp.o
[ 34%] Building CXX object src/brain/CMakeFiles/Brain.dir/Knowledge/Obstacles/TeamObstacleFilter.cpp.o
[ 35%] Building CXX object src/brain/CMakeFiles/Brain.dir/Knowledge/Obstacles/ObstacleFilter.cpp.o
[ 36%] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/CollisionDetection/CollisionDetector.cpp.o
[ 36%] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/FootCollisionDetector/FootCollisionDetector.cpp.o
[ 37%] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/HeadDamageProvider/HeadDamageProvider.cpp.o
[ 37%] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/MotionPlanning/MotionPlanner.cpp.o

/home/heodel/HULKsCodeRelease-master/src/brain/Knowledge/LandmarkFilter/LandmarkFilter.cpp: In member function 'std::tuple<bool, long unsigned int, float> LandmarkFilter::findCenterLineOrientation(const std::vector<LineInfo >&, const LandmarkFilter::PointCluster2D&)':
/home/heodel/HULKsCodeRelease-master/src/brain/Knowledge/LandmarkFilter/LandmarkFilter.cpp:464:45: error: converting to 'std::tuple<bool, long unsigned int, float>' from initializer list would use explicit Constructor 'constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {bool, long unsigned int&, float&}; <template-parameter-2-2> = void; _Elements = {bool, long unsigned int, float}]'
     Return {true, longestLineId, orientation};
                                             ^
/home/heodel/HULKsCodeRelease-master/src/brain/Knowledge/LandmarkFilter/LandmarkFilter.cpp:466:25: error: converting to 'std::tuple<bool, long unsigned int, float>' from initializer list would use explicit Constructor 'constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {bool, int, float}; <template-parameter-2-2> = void ; _Elements = {bool, long unsigned int, float}]'
   Return {false, -1, 0.f};
                         ^
[ 38%] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/WhistleDetection/WhistleDetection.cpp.o

/home/heodel/HULKsCodeRelease-master/src/brain/Knowledge/LandmarkFilter/LandmarkFilter.cpp: In member function ‘std::tuple<bool, float> LandmarkFilter::findIntersectionOrientation(const LandmarkModel::Intersection&)’:
/home/heodel/HULKsCodeRelease-master/src/brain/Knowledge/LandmarkFilter/LandmarkFilter.cpp:796:38: error: converting to 'std::tuple<bool, float>' from initializer list would use explicit constructor 'constexpr std ::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = bool&; _U2 = float&; <template-parameter-2-3> = void; _T1 = bool; _T2 = float]'
   Return {hasOrientation, orientation};
                                      ^
[ 39%] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/ReplayRecorder/ReplayRecorder.cpp.o
[ 39%] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/OdometryOffsetProvider/OdometryOffsetProvider.cpp.o
[ 40% ] Building CXX object src/brain/CMakeFiles/Brain.dir/Modules/TeamPlayersAugmenter/TeamPlayersAugmenter.cpp.o
[ 41%] Building CXX object src/brain/CMakeFiles/Brain.dir/SPLNetwork/HULKsMessage.cpp.o
Src/brain/CMakeFiles/Brain.dir/build.make:614: recipe for target 'src/brain/CMakeFiles/Brain.dir/Knowledge/LandmarkFilter/LandmarkFilter.cpp.o' failed
Make[2]: *** [src/brain/CMakeFiles/Brain.dir/Knowledge/LandmarkFilter/LandmarkFilter.cpp.o] Error 1
Make[2]: *** Waiting for unfinished tasks....
CMakeFiles/Makefile2:215: recipe for target 'src/brain/CMakeFiles/Brain.dir/all' failed
Make[1]: *** [src/brain/CMakeFiles/Brain.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
Make: *** [all] Error 2
-- Compilation failed!

If you can help me I would be appreciate!

31 no vision percepts (chestboard disconnect?

HULK service was still running.

Log output from the NAO:

2023-02-01 17:00:00  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/default.json"...
2023-02-01 17:00:00  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/nao_location/default.json"...
2023-02-01 17:00:00  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/body.P0000073A10S9A900008.json"...
2023-02-01 17:00:00  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/head.P0000074A06S9A900006.json"...
2023-02-01 17:15:43  tungstenite::handshake::server  DEBUG  Server handshake done.
2023-02-01 17:16:38  tungstenite::protocol  DEBUG  Received close frame: None
2023-02-01 17:16:38  tungstenite::protocol  DEBUG  Replying to close with Frame { header: FrameHeader { is_final: true, rsv1: false, rsv2: false, rsv3: false, opcode: Control(Close), mask: None }, payload: [] }

   0: failed to execute cycle of cycler `SplNetwork`
   1: failed to execute cycle of node `MessageReceiver`
   2: failed to read from network
   3: termination requested

Location:
   crates/hulk/src/network.rs:64

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

   0: failed to execute cycle of cycler `VisionBottom`
   1: failed to execute cycle of node `ImageReceiver`
   2: failed to wait for device
   3: failed to reset
   4: failed to open
   5: failed to set focus_absolute to 0
   6: failed to set control
   7: EIO: I/O error

Location:
   crates/hulk/src/nao/camera.rs:91

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Cameras seem to exist, maybe the camera reconnection did not work correctly?

nao@tuhhnao31:~$ ls -al /dev/video
video-bottom           video-top              video0                 video2                 
video-bottom-metadata  video-top-metadata     video1                 video3

Post Open Source Release TODOs

  • SSH key removal
  • SSH key automatic login @schmidma
  • Make meta-hulks public (and the Rattenschwanz that is pulled by that)
  • All links to the old HULKsCodeRelease repo need to be updated to point to hulk
    • Internal pages, Readmes
    • hulks.de
    • External RoboCup, pages etc.
  • Merge queue cannot be activated because hulk is not part of the closed beta. It will be generally available in Q4 2022, see github/roadmap#370 Edit: It is now available again for this repository and has been activated.
  • CI Checks need to be added to branch protection rule once the first check had run
  • Migrate issues: We are moving issues over if we see fit.
  • Migrate PRs: We are moving and rebasing PRs over if we see fit.
  • Migrate labels
  • Work out a policy/workflow how to resubmit PRs to the new repository
    • Add hulk remote in your repository
    • Fetch it
    • Checkout the main branch of the hulk remote
    • Create the new branch that will contain the "rebased" changes
    • Then cherry-pick the individual commits e.g. git cherry-pick beginning_hash..ending_hash where beginning_hash and ending_hash are commit IDs. Careful, the beginning_hash has to be the base of your branch, not the first commit on top of that.
    • Push your new branch
    • Open a PR
    • Profit
  • readme title #331
  • Kanban board https://github.com/orgs/HULKs/projects/2
  • Was ist das?
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    • is automatically filled by GitHub Actions with a token that has write access
  • Update Documentation hulks.de/hulk
  • Decide what to do with the wiki: The important stuff has been migrated
  • archive hulks/nao
  • CI security considerations
    • Are there any keys/secrets accessible from inside the docker containers?
    • Do the containers have access to any system resources that could be a problem?

Cleanup `default.json`

Cleanup etc/configuration/default.json. There are some parameters in there that do not exist anymore or are not used.

7v7 Games

To prepare for the 7v7 games we will be facing in the upcoming RoboCup, we need to make some improvements as adding two additional robots per team on the rather small field will lead to chaos otherwise.

  • Players enum
  • Init positions
  • Ready positions
  • New Roles

(old ... partially obsolete)

  • The main thing will be to implement new kick decisions to pass the ball to other players to avoid having to walk long distances with the ball.
  • For the passes to work reliably, we will need a robot-detection that can tell us where the opponent's robots are to avoid passing to the enemy team.
  • Our kicks need tuning, we will need very accurate kicks over long distances to make it work well.
  • Maybe our role assignment needs rethinking, just adding more defenders and an additional bishop might not be the most effective strategy.
  • With two additional robots sending messages, we will need to think about the message budget and what to send over Wi-Fi.

More active HULKs on the field

We want to have more active HULKs on the field during a game.
This means less falling over, less bumping into other robots, and a faster stand-up motion if a fall occurs.
Less bumping into other robots will also help reducing our penalties.
For this to happen we need better obstacle detection (including the damned goal posts).
See also: Robot Detection #44

This topic is closely related to 7v7 Games #37

Add more CI checks to HULA

With #31 we get/got a new HULA. Currently the CI only builds the binary but e.g. there are no clippy checks. Please add those and other that we also have for the main workspace.

Maybe @Bendodroid could take a look...

Postgame Notes

2022-12-14 Testgame

Branch: main + julianschuler:whistle-allocation

  • Keeper loca is fine when placed correctly in initial
  • Playernumber 3 & 4 in INITIAL walk across the own half to a SET-position closer to the other robot
  • #30
  • Need better positioning/pathfinding when ball is behind robot and multiple own robots very close to ball
  • Corner-kick & Free-kick positioning should be smarter

2023-01-25

Branch: main

  • #52
  • #53
  • Robots walking into goal posts
  • #54
  • Walking in the SMD needs tuning (See above :P )
  • #55

2023-02-01

Branch: main

  • 31 wrong hypothesis, in own goal in READY
  • 28 delocalised
  • Red 3 stuck in goalpost, falling over, wrong kick foot when ball directly next to goal post
  • Walking parameters need tuning (See above :P)
  • #89
  • #88

Ideas for next iteration

Things that @h3ndrk has on his list but may not have time for them. Feel free to remove them here and create individual issues.

  • Visual semantic segmentation
  • Opponent robot orientation estimation
  • Datatype/module recording and replay
  • Extract communication server into crate and integrate into behavior simulator (allow Flora to connect) #21
  • Integrate logging into framework
  • Support getting the next data item without subscribing (registers temporary subscriber and waits for single data item, then unsubscribes automatically) #21
  • Deduplicate configuration for vision cyclers ($this_cycler should be optional and also usable in the middle of the path)
  • Audio playback
  • Fix change notification for children configuration parameters
  • Automatically generate databases and configuration from module attributes
  • Statically check validity/completeness of to be uploaded configuration files before uploading/at compile time
  • Reduce code duplication in communication server #21
  • Integrate aliveness message receival into the nao crate #27
  • Parallelize Pepsi for multiple robots (dependency graph) #46
  • Readd remote control support via WiFi and smartphone browser (needs to be deployed on all NAOs, NAOs need to open a WiFi network when e.g. pressing a button)
  • Write more documentation
  • Custom clippy checks for formatting and other rules that the HULKs want to enforce in the repository
  • Replace Yocto with Nix
  • Twix 2
  • Coordinate systems

Recheck and improve errors during development

Recheck and improve errors thrown by the framework that happen when developing as a normal developer (e.g. when there is a non-produced output or lexer errors)

  • Check that a required input has at least one optional path segment and an Option type
  • Check that cycler instances exist that the user writes in the context structs
  • When data types of e.g. inputs do not match with their e.g. outputs, we get meaningless errors for the mismatched types but no context, where it happened

Unable to run the mate-tool

From #2 by @Heodel:

Then for the mate of the tool I encountered the following error in python3, always showing trying to connect localhost or robots ip.

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    Self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    Self._target(*self._args, **self._kwargs)
  File "/home/heodel/HULKsCodeRelease-master/tools/mate/mate/net/nao.py", line 41, in <lambda>
    Self.config_thread = threading.Thread(target=lambda: asyncio.new_event_loop().run_until_complete(self.__connect_config()))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    Return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    Raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    Result = coro.send(None)
  File "/home/heodel/HULKsCodeRelease-master/tools/mate/mate/net/nao.py", line 64, in __connect_config
    Self.config_loop = asyncio.get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 632, in get_event_loop
    Return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 578, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-4'.

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    Self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    Self._target(*self._args, **self._kwargs)
  File "/home/heodel/HULKsCodeRelease-master/tools/mate/mate/net/nao.py", line 39, in <lambda>
    Self.debug_thread = threading.Thread(target=lambda: asyncio.new_event_loop().run_until_complete(self.__connect_debug()))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    Return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    Raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    Result = coro.send(None)
  File "/home/heodel/HULKsCodeRelease-master/tools/mate/mate/net/nao.py", line 45, in __connect_debug
    Self.debug_loop = asyncio.get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 632, in get_event_loop
    Return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 578, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-3'.

Loca komplett im Arsch

All 5 robots had barely any localisation in the last test game, check if Loca is correctly using all available data with the new Framework.

Sysroot symlink is not set correctly in documentation

From #2 by @Heodel

I encountered some minor errors in your official code during the installation process:
In section 2.5.1 of the manual

Listing 2.5.1
Ln -s sysroot-7.3.0-1.tar.bz2 toolchain /sysroot-7.3.0-1.tar.bz2
./ scripts/gammaray -w -a <NAOIP > <NAONUMBER >

After the ln command is executed, when I execute the gammaray command, I always get an error. When I look at the code, I find 153 lines in gammaray:

  If [ ! -f "${BASEDIR}/toolchain/sysroot.tar.bz2" ]; then

So the command executed in 2.5.1 should be

Ln -s sysroot-7.3.0-1.tar.bz2 toolchain /sysroot.tar.bz2

Not is

Ln -s sysroot-7.3.0-1.tar.bz2 toolchain /sysroot-7.3.0-1.tar.bz2

Control cycler improvements

  • Remove 640 and 480 magic values in regards to camera resolution and introduce configuration parameters
  • deduplicate project_penalty_area_on_images in localization and camera matrix calculator
  • unflatten RobotKinematics to reduce the number of fields (and increase readability)
  • Correctly capitalize all messages in errors, panics, unwraps, expects, ...
  • Separate configuration types into own files or in other words, group them by robotics domain
  • Reimplement exposing walking engine module variables as additional outputs

Add more formatting CI checks

TOML and JSON files are currently not checked for proper formatting in the CI.
This leads to unnecessary changes in unrelated PRs because some file wasn't formatted properly beforehand.

24 crash & reboot on stand up (probably HAL crash)

I don't know what happened here...

nao@tuhhnao24:~$ hulk status
○ hulk.service - HULK Service
     Loaded: loaded (/lib/systemd/system/hulk.service; enabled; preset: enabled)
     Active: inactive (dead)

Feb 01 17:18:20 tuhhnao24 systemd[1]: Dependency failed for HULK Service.
Feb 01 17:18:20 tuhhnao24 systemd[1]: hulk.service: Job hulk.service/start failed with result 'dependency'.
nao@tuhhnao24:~$ systemctl status hula
○ hula.service - HULA Service
     Loaded: loaded (/lib/systemd/system/hula.service; enabled; preset: enabled)
     Active: inactive (dead)

Feb 01 17:18:20 tuhhnao24 systemd[1]: Dependency failed for HULA Service.
Feb 01 17:18:20 tuhhnao24 systemd[1]: hula.service: Job hula.service/start failed with result 'dependency'.
nao@tuhhnao24:~$ systemctl status lola
○ lola.service - Aldebaran LoLA
     Loaded: loaded (/lib/systemd/system/lola.service; enabled; preset: enabled)
     Active: inactive (dead)

Feb 01 17:18:20 tuhhnao24 systemd[1]: Dependency failed for Aldebaran LoLA.
Feb 01 17:18:20 tuhhnao24 systemd[1]: lola.service: Job lola.service/start failed with result 'dependency'.
nao@tuhhnao24:~$ systemctl status hal 
● hal.service - Aldebaran HAL
     Loaded: loaded (/lib/systemd/system/hal.service; enabled; preset: enabled)
     Active: active (running) since Wed 2023-02-01 17:18:55 UTC; 7min ago
   Main PID: 415 (hal)
      Tasks: 5 (limit: 4586)
     Memory: 2.8M
     CGroup: /system.slice/hal.service
             └─415 /opt/aldebaran/bin/hal

Feb 01 17:24:27 tuhhnao24 hal[415]: [I] 1675272267.513035 416 diagnosisPlugin:   4 nacks            on LeftArmBoard since 2 min, lvl up   (2), next timeOut in>
Feb 01 17:24:27 tuhhnao24 hal[415]:   4 nacks            on LeftArmBoard since 2 min, lvl up   (2), next timeOut in 5 min, ack 27527, nack 6
Feb 01 17:24:52 tuhhnao24 hal[415]: [I] 1675272292.588111 416 diagnosisPlugin:   4 nacks            on RightHipBoard since 2 min, lvl up   (2), next timeOut i>
Feb 01 17:24:52 tuhhnao24 hal[415]:   4 nacks            on RightHipBoard since 2 min, lvl up   (2), next timeOut in 5 min, ack 29607, nack 6
Feb 01 17:25:02 tuhhnao24 hal[415]: [I] 1675272302.617121 416 diagnosisPlugin:   1 errors       162 on LeftFootBoard since 1 min, same lvl (1), next timeOut i>
Feb 01 17:25:02 tuhhnao24 hal[415]:   1 errors       162 on LeftFootBoard since 1 min, same lvl (1), next timeOut in 1 min
Feb 01 17:26:02 tuhhnao24 hal[415]: [I] 1675272362.625234 416 diagnosisPlugin:   1 errors       162 on LeftFootBoard since 1 min, same lvl (1), next timeOut i>
Feb 01 17:26:02 tuhhnao24 hal[415]:   1 errors       162 on LeftFootBoard since 1 min, same lvl (1), next timeOut in 1 min
Feb 01 17:26:08 tuhhnao24 hal[415]: [I] 1675272368.652804 416 diagnosisPlugin:  10 nacks            on RightThighBoard since 5 min, lvl up   (3), next timeOut>
Feb 01 17:26:08 tuhhnao24 hal[415]:  10 nacks            on RightThighBoard since 5 min, lvl up   (3), next timeOut in 30 min, ack 35906, nack 17
nao@tuhhnao24:~$ cat hulk/logs/hulk.out 
2023-02-01 16:58:34  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/default.json"...
2023-02-01 16:58:34  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/nao_location/default.json"...
2023-02-01 16:58:34  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/body.P0000073A03S85V00027.json"...
2023-02-01 16:58:34  communication::server::parameters::directory  DEBUG  Reading "etc/configuration/head.P0000074A03S85V00012.json"...
nao@tuhhnao24:~$

Reduce implicity while writing code for the framework

  • Solve cycler instance names in another way rather than a magic enum CyclerInstances
  • Explicitly mark first module
  • Merge HULK binary and cycler crates into robotics domain crate. Create single framework crate that does all the code generation.
  • Register modules more explicitly instead of discovering them automatically (maybe in Cargo.toml or in Rust code)

Reset filters when entering the Playing state

When the robot is placed at the sideline after penalization or at the start of a game, the person placing the robot might trigger sonar obstacles.
The robot should remove all those obstacles by clearing the sonar filter state when entering playing. Alternatively, the filters only run when in the playing state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.