This is a simulation of a sheep walking around in the landscape and doing nothing.
The behavior of the virtual sheep is based on a distributed variant of a simulated flock of birds. Each sheep is a single process that is connceted to the other sheep and receives their position information. It then tries to stay close to the center of the herd while at the same time avoiding collisions with other sheep.
In addition to the virtual sheep we have also a fake plastic sheep that is tracked by our system and can be moved around freely by the user. For the virtual sheep, the tracked position information of the fake sheep is indistinguishable from the other virtual sheep, so in the end of the day the virtual herd will center around the plastic sheep.
The sheep simulation at this point is not highly advanced. For example when introducing a second plastic sheep, the virtual herd will center in the middle between the two plastic sheep. This component could be easily replaced by a better simulation. In fact when we were testing the system, for some time we had the sheep only running aroud in circles until the simulation code was ready for deployment.
Needs & Abilities
As stated in the Sheep.xml
file, the service has the following Needs and Abilities.
- Ability: PoseData (SvcProtPushSupplier?); the Pose of the virtual Sheep
- Ability: SceneData (SvcProtPushSupplier?); the Look & Feel of the Sheep.
- Ability: UserAction? (SvcProtPushSupplier?); connects the Look & Feel of the Sheep with its Pose.
Interaction with other Services
- Other Sheep interact with each other.
- A real sheep is tracked, for example by the ServiceARTTracker, which sends PoseData as well. Sheep therefore interact with real sheep as well.
- The sheep are displayed on ServiceVRMLDisplay? (deprecated)
- The sheep are displayed on the new ServiceViewer. A sheep sends (periodically) SceneData events to describe itself; it also sends UserAction? events to connect the SceneData node in the scenegraph with its PoseData events.
- User interface send SheepData? events, the sheep dies or whatever. It does not yet change its color.
This section describes how to set up and try out a sheep.
What do i have to do when i want the sheep to send the new "registration" Events? -- OtmarHilligesOld?
- 10 Jul 2003
A: A CVS update i see... -- OtmarHilligesOld? - 10 Jul 2003
No special packages are required. If you have a running DWARF installation, do a
in the Sheep directory. This creates an application called
which can be started on the command line.
, start some service that needs PoseData
(for example ServicePoseDataReceiver?
). Have fun with ServiceDIVE
Command Line Parameter
You can use the following command line parameter:
- -Dhelp=<bool>: show help text
- -Dfps=<int>: numer of position events per second; default is 10
- -DsimFps=<int>: numer of simulated events per second (you do not need to understand this); default 250
- -Dmv=<double>: maximum velocity of the sheep; default is 0.01
- -Dx=<double>: initial x-coordinate; default is random (between 0 and 1)
- -Dy=<double>: constant y-coordinate; default is 0. This is vertical direction (height), by the way.
- -Dz=<double>: initial z-coordinate; default is random (between 0 and -.75)
- -Dfast=<bool>: ignore -Dfps and push as fast as you can. this is fun.
- -DsheepName=<string>: DEPRECATED. we use the serviceid as name for the sheep. sorry. get a real sheep when you want to name it.
Known Bugs and Limitations
The original underlying Boid simulation is not really used anymore right now; the source needs significant cleanup at this point.
There is a known bug that a sheep that dies is not removed from the Boid simulation. It stays there as a zombie and is still used for calculation of the new direction.
The sheep does not yet respond to change color events.
There is an issue that a resumed sheep that is woken up at a new position still reappears at its old position.Or somewhere else. It is not yet know whether this bug resides in ServiceSheep
or in the user interface controller or somewhere else, though. Innocent until proven guilty.