[robocup-msrs] Answers to questions
Cesar Flores
cesar7 at gmail.com
Wed Jun 27 01:16:50 EDT 2007
I had the same error. In fact, I fixed some lines of Kyle code. I show you
next.
using simengine = Microsoft.Robotics.Simulation.Engine;
In start method:
_notificationTarget = new simengine.SimulationEnginePort();
simengine.EntitySubscribeRequestType esrt = new simengine.
EntitySubscribeRequestType();
esrt.Name = "blueteam/field/2/simulatedsoccerplayer/robotmotioncontrol"; //
for example
esrt.Subscriber = ServiceInfo.Service;
simengine.SimulationEngine.GlobalInstancePort.Subscribe(esrt,
_notificationTarget);
MainPortInterleave.CombineWith(new Interleave( new TeardownReceiverGroup(),
new ExclusiveReceiverGroup(
Arbiter.Receive<simengine.InsertSimulationEntity>(true,
_notificationTarget, InsertEntityNotificationHandler),
Arbiter.Receive<simengine.DeleteSimulationEntity>(true,
_notificationTarget, DeleteEntityNotificationHandler)
),
new ConcurrentReceiverGroup()));
And the next methods:
simengine.VisualEntity _entity;
void InsertEntityNotificationHandler(simengine.InsertSimulationEntity ins)
{
_entity = (simengine.VisualEntity)ins.Body;
}
void DeleteEntityNotificationHandler(simengine.DeleteSimulationEntity del)
{
_entity = null;
}
Finally for knowing the position of the robot use kyle code directly. For
another entity I repeated the code subtituying esrt.Name with another
service name (SoccerBall for example). I think that this works for knowing
the parameters of almost all entities in the field. But I test only for
robodug and ball. However I can not move yet the robodug, not also the ball
with kyle code because I have compilation errors. For example for the ball
the system says that
Microsoft.Robotics.Simulation.Physics.PhysicsEntitydoes not contain a
definition for '
IsKinematic' and not also for SetPose when I try the next:
void MoveInternal(Vector3 position)
{
_entityball.PhysicsEntity.IsKinematic = true;
_entityball.PhysicsEntity.SetPose(new Pose(position));
}
Any Ideas?
César Flores
Borregos Msrs
I can't move the ball or the robodug directly in the code with kyle code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cc.gatech.edu/pipermail/robocup-msrs/attachments/20070627/7803a943/attachment-0001.html
More information about the robocup-msrs
mailing list