roboteamtwente / roboteam_ai Goto Github PK
View Code? Open in Web Editor NEWArtificial Intelligence repository for RoboTeam Twente
Home Page: http://www.roboteamtwente.nl
License: MIT License
Artificial Intelligence repository for RoboTeam Twente
Home Page: http://www.roboteamtwente.nl
License: MIT License
Is your feature request related to a problem? Please describe.
It would be very useful if we can control two teams (i.e. in simulation).
At the moment the robotcommands are send to the team indicated by the ROS parameter server.
Describe the solution you'd like
The best way, for now, would be to find out how to run two instances of ROS.
Describe alternatives you've considered
We could build it to run two trees simultaneously, but that is certainly not possible because of ROS params.
The ball position in the interface is drawn on a different point using drawDataPoints() than it is drawn as natively drawn in the interface. This also goes for robot positions, it seems.
See the .cpp. They can probably be deduced from Field class.
Send 0 velocity commands to all robots before halting to stop them faster
there are too many go to posses everywhere,
we should limit these to -> controlGoToPos-folder and (maybe) one single gotopos-skill for when you don't need an explicit skill for going to a position.
After the small example demo is done there should be a big BTFactory test
It would be nice if there is a globally available max_velocity that listens to the current refstate, since the maximum velocity of our robots is dependent on that.
Roboteam as become quite big and we need to re evaluate it's structure.
Currently all over the place, needs to be in one place.
Should have functionality to reliability calculate absolute angle differences, angular velocity etc.. Currently functionality for this is all over the place in our entire system.
Currently M_PI and other definitions (PI=3.14159) are used through eachother and it's quite messy.
Possibly doing this in roboteam_utils is a good idea so we can also use this consistently in roboteam_vision, roboteam_robothub and other repo's.
There is legacy singleton code in BTFactory. This should change into static function.
when initializing Ball placement tree the ballplacement bot does not go to the ball but it somehow closes towards the center of the field.
Ideally it would become a pointer in World::getBall() so that it can also dissappear, like our Robots.
Describe the bug
IOTest_it subscribes fails sometimes.
To Reproduce
Steps to reproduce the behavior:
Run IOTest a gazillion times
Expected behavior
It should work ALL the time. Might be a ROS problem.
Describe the bug
There are 3 lines which are in BTTest which I can't seem to refactor to work again (Google Friend Test is being annoying). They are commented out for now, and not very important.
It might be a good idea to create a few (no more than 5) new composites which are more intuitive for relatively simple stuff like if/else statements etc - when compared to the current implementation.
Describe the bug
There is a segfault when closing a mainwindow (for example closing the window in qt). This is pretty annoying for testing especially, but for running roboteam_ai not really an issue.
System
segfault at line 20: "lastDistances[bot.id] = dist;
lastDistances is a std::map<int, double>, at segfault contains:
17 entries of which "first" equals (bot->id = 2) four times!!
My guess would be the problem is that there are four keys with the value 2..
coach has a few things that should not be in there:
Create (working) tests for the robot dealer.
Probably some module is not working fully yet. (probably a different world object is used, since rtt::Lastworld has been replaced by rtt::ai::World.
Describe the bug
The max velocity (so (sqrt(xvel^2+yvel^2)) in a robotcommand should be 8.191 m/s (see robothub). Many skills use PID's (Keeper, Interceptball,Attack, GoToPos, DefendOnRobot,GetBall, Harrass, GoToPosLuth). If these are too high robothub will not send a command. We should build a limiter that tests if a skill is not sending too high commands. This also goes for most of the other things in a robotcommand, although velocity and orientation most commonly are the ones that break.
The keeper keeps running Interceptball after it has intercepted it and redirected it from the goal, so the condition for the skill to terminate need to be looked at and made robust so it does not try to intercept the ball after it has already been intercepted.
JSON files not properly copied towards running directory
For running with roslaunch, roboteam ai gets executed in either ~/.ros
or in cwd
which is in this case workspace/devel/roboteam_ai/lib/
. In these folders it needs the json files (specifically in roboteam_ai/src/jsons
even).
The current hack is done in cmakelists.txt:
# copy all jsons to devel of ROS
file(GLOB JSONSa "${PROJECT_SOURCE_DIR}/roboteam_ai/src/jsons/keeper/*.json")
file(COPY ${JSONSa} DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/roboteam_ai/src/jsons/keeper)
file(GLOB JSONSb "${PROJECT_SOURCE_DIR}/roboteam_ai/src/jsons/strategies/*.json")
file(COPY ${JSONSb} DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/roboteam_ai/src/jsons/strategies)
file(GLOB JSONSc"${PROJECT_SOURCE_DIR}/roboteam_ai/src/jsons/tactics/*.json")
file(COPY ${JSONSc} DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/roboteam_ai/src/jsons/tactics)
This does not always work. We should find a better solution for this.
remove the tactics which are not used, which is pretty much every single one except defaulttactic.
we currently have two classes in control which are PID's. Remove one, keep the other, and use that one everywhere.
Right now the TreeInterpreter creates a leaf for every leaf in the trees without the actual skill or condition that it should be. After they are in the repository this can be fixed and tested afterwards
The interface code is mainly written in mainWindow.h/cpp, but it should be more structured, probably with separate classes for the widgets.
This is important because of testing the keeper.
segmentation fault in getgotoposluthpoints, probably due to multithreading safety
The colors of the robots in the interface should correspond to the rosparam our_color
We know the delay of our system.
We know a robots' response to commands (roughly).
If we know the exact point in time of the world state, we could model where our robots' actually are by the time they receive a command based on the previous commands we sent. We would have to listen to our own robotcommands and build a module that simulates the robot behavior for short intervals (<0.2 s).
Describe the bug
The controller.cpp file could be neater.
Currently a tactic claims a fixed amount of robots, and otherwise a custom tactic needs to be build. I suggest hereby a slightly different implementation that should make tactics more flexible while maintaining the security that a claimed robot stays claimed.
I hereby propose that the default tactic takes not one, but two strings of robots w/ rolenames. One of these is optional and the other is required. An example for switches would be the following:
{"SimpleDefendTactic",
{ // required robots
{"simpleDefender1", robotType::closeToOurGoal},
{"simpleDefender2", robotType::closeToOurGoal},
},
{ // optional robots
{"simpleDefender3", robotType::closeToOurGoal}
}
}
The behaviour tree can be the same, but the fact if a robot is optional or not is dependent on the name in the tree. A tactic can execute without the optional robot, but it would be better if it has that robot. In this case we can create optional defenders for attack tactics, or claim every robot if they are available.
This would certainly reduce the amount of work needed to create custom tactics as well.
bool robothasball()
is at a lot of places.
we should merge these into one. (preferrably into the world one)
Describe the bug
getRobotForID will fail when trying to access multiple robots, as it is a shared_pointer. We likely want to implement a new function that can give multiple robots at once.
To Reproduce
Run WorldTest
Describe the bug
segmentation fault in Field::getField(), probably due to multithreading / not threadsafe
segf occurs at widget/interface
fix by making Field threadsafe using lock guards
it might be nice to make more (static) classes threadsafe like world, control and other utilities
Is your feature request related to a problem? Please describe.
Compilation is taking a long time because of countless includes.
Describe the solution you'd like
Forward declarations should solve it!
Change sides button will rotate the world_state and commands, however, because geometry data is sent only every 3 seconds our robots will drive 180 degrees the other direction and orientation. This is why we need to halt all robots before changing sides.
Is your feature request related to a problem? Please describe.
There is a lot of duplicate functions with different parameters that check whether a robot has a ball. E.g. the condition, the getBall function, the coach etc. etc.
Describe the solution you'd like
One clear function that is implemented in one place or clearly seperate names with separate functionalities.
There are some function like "getRobotClosestToLine" in the RobotDealer that should be put on the coach. And some of them are just duplicated there already. Someone should purge the system of all the duplicate functions.
Right now the only condition the robot dealer uses to assign robots is if they are free from any tactic or not. This should be further improved by proximity, previous roles, and other heuristics.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.