Created
April 25, 2012 12:35
-
-
Save Cifro/2489436 to your computer and use it in GitHub Desktop.
Problem with service ports...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In OnExecute() function in joystick RTC i have something like this: | |
if (this.naoPosesConsumer.IsValid) | |
{ | |
if (this.joystick.ButtonPressed(7)) | |
{ | |
this.naoPosesConsumer.Proxy.InitialPose(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using OpenRTM.Core; | |
using Aldebaran.Proxies; | |
namespace NaoMotionRTC | |
{ | |
class NaoPosesInitialisation: INaoPosesInitialisation | |
{ | |
private MotionProxy motion; | |
public void setMotionProxy(MotionProxy motion) | |
{ | |
this.motion = motion; | |
} | |
public void InitialPose() | |
{ | |
if (this.motion != null) | |
{ | |
Console.WriteLine("InitialPose called."); | |
// exception raised here O.o | |
if (this.motion.walkIsActive()) | |
{ | |
this.motion.stopWalk(); | |
} | |
float HeadYawAngle = 0; | |
float HeadPitchAngle = 0; | |
// etc... settings for angles. | |
this.motion.angleInterpolationWithSpeed("Body", angles.ToArray(), 0.3f); | |
} | |
else | |
{ | |
Console.WriteLine("[InitialPose()] Motion proxy is not connected. Call setMotionProxy() method first."); | |
} | |
} | |
public void StandPose() | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment