[robocup-msrs] Answers to questions

Cesar Flores cesar7 at gmail.com
Thu Jun 28 01:45:04 EDT 2007


Thanks, this solved my problem. I can now move the objects from the code :)

César Flores


On 6/27/07, George Chrysanthakopoulos <georgioc at microsoft.com> wrote:
>
>  Hi Cesar, you are doing the right things. To calls these APIs, add this
> namespace:
>
>
>
> using Microsoft.Robotics.Simulation.Physics;
>
>
>
> And also add the PhysicsEngine.dll to your references in your C# project.
>
>
>
>
>
>
>
>
>
> *From:* robocup-msrs-bounces at cc.gatech.edu [mailto:
> robocup-msrs-bounces at cc.gatech.edu] *On Behalf Of *Cesar Flores
> *Sent:* Tuesday, June 26, 2007 10:17 PM
> *To:* Nikos Vlassis
> *Cc:* robocup-msrs at cc.gatech.edu
> *Subject:* Re: [robocup-msrs] Answers to questions
>
>
>
> 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. InsertSimulationEntityins)
>
> {
>
>     _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/20070628/c3b6fd72/attachment.html 


More information about the robocup-msrs mailing list