Summary
SPARK is a module responsible for 3D environment management and spatial reasoning (including perspective taking).
SPARK uses Move3D to store the 3D model of the world and compute reachability and visibility of objects.
DEPENDENCIES AND HOW TO INSTALL
SPARK is not yet in Robotpkg, but will be soon (thanks to Severin MHP is now in robotpkg). For the moment, you have to do the classic git clone from trac.laas.fr.
The big dependency is Move3D. The others are genMAnip, genBasic, and depending on the chosen configuration, JIDO -> lwr, pom, platine, HRP2 -> pom, hrp2, ORO ->liboro.
When you want to generate the module with genom, you can specify the configuration like, genom -t -o -DJIDO -DORO spark.gen (this configuration is installed on Jido).
What does SPARK compute ?
This page details what SPARK computes and provides.
INPUTS and OUTPUTS
The general architecture of SPARK is following:
IMPORTANT: SPARK and MHP should be launched with the same p3d file, so that they contain the same environment definition.
The module communicates automatically to ORO and provides a poster containing the current screenshot of the environment. MHP reads this poster and updates its own environment before planning any motion.
HOW TO USE
SPARK depends on Move3D, and like MHP it needs a Move3D environment file (.p3d) containing the geometric definitions of robots, objects and humans. Normally .p3d files can be found in BioMove3DDemos git repository in /usr/local/motion. For CHRIS we normally use the files in BioMove3DDemos/GS/*.p3d (gsJidoKuka.p3d for ex)
Requests
The name of the requests as well as their I/O are almost the same as the ones in MHP:
Standard Requests
LoadP3d(.p3d file, 1, 0): This request is the initialization request and should be launched before anything else.
LoadSce(.sce file): .sce files are senario files of Move3D. They contain a default position for everything in the env.
ReadRobot(ArmPoster, pomPoster, PlatinePoster): In order to keep the robot in SPARK synchronized with the real robot, we run this looping request(-ack is necessary in tcl)
ReadHumans(Mode, HumanPoster): to make SPARK read and update humans in the environment. Mode can be USE_GEST, USE_MOCAP or USE_MORSE depending on the source.
ReadObjects(vimanPoster): Same for the objects.
PlaceAgent(name, coords...): To place an agent(robot/human) by hand you use this request. name is case insensitive and accepts only a part of the agents real name.
PlaceObjects(name, coords...): Same for an object
Interface Requests
By default the interface is launched but is inactive.
UpdateInterface(): Looping request. Refreshes the interface.
ChangeCameraPos(x,y,z,dist,azimuth,elevation): changes the point of view of the camera of the interface. x,y,z is the point to point at. dist is the distance to that point. Azimuth and elevation are two angles in spherical coords to move around that point.
SetInterfaceParams(params...): A couple of parameters to change the quality of the interface (&and put walls, shadows, ground, etc)
SetInterfaceAgentParams(name, params...): Activates/Deactivates the FOV,FOA and pointing visualizations.
Situation Assessment Requests
IsVisible(object, Agent): returns VISIBLE/INVISIBLE depending on the visibility of the object to the Agent.
IsReachable(object,Agent): returns REACHABLE/UNREACHABLE
UpdateObjectStates(): This looping request (-ack needed) computes all the spatial relations and send them to ORO.