使用 XBOX 控制器将 Lego NXT 连接到 MRDS 时创建服务 xinputgamepad 时出错
我正在尝试实现简单的机器人示例,使用 xbox 控制器将我的 Lego NXT 连接到 MRDS (Microsoft Robotics Studio 和 Lego Mindstorms NXT)
一切都编译得很好,但是当我去运行该服务时,出现以下错误:
*** Error creating service. Service type:http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
这是以下的输出构建:
Not processing file:c:\users\matthew\microsoft robotics dev studio 4 beta\bin\xinputgamepad.y2006.m09.dll
* Contract directory cache refresh complete [10/25/2011 21:22:18][]
*** Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html [10/25/2011 21:22:18][]
*** Exception during service type creation: System.IO.FileNotFoundException: Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
at Microsoft.Dss.Services.Constructor.ConstructService.Process() [10/25/2011 21:22:18][]
*** "TaskExecutionWorker:HandleException": Exception:System.IO.FileNotFoundException: Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
at Microsoft.Dss.Services.Constructor.ConstructService.Process()
at Microsoft.Dss.Services.Constructor.InternalConstructor.CreateNewServiceHandler(ConstructService Create)
at Microsoft.Ccr.Core.Task`1.Execute()
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecuteTaskHelper(ITask currentTask)
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecuteTask(ITask& currentTask, DispatcherQueue p, Boolean bypassExecute)
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecutionLoop()
*** Error creating service. Service type:http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html [10/25/2011 21:22:18][http://buzzman-pc.mex.com.au:40000/constructor]
我正在运行 Mircosoft Robotics Studio Beta 4,我知道该示例是在 2007 年制作的,因此可能存在混淆。这是我的合作伙伴代码:
[Partner("drive", Contract=drive.Contract.Identifier, CreationPolicy=PartnerCreationPolicy.UseExisting)]
private drive.DriveOperations _drivePort = new drive.DriveOperations();
[Partner("XInputGamepad", Contract = gamepad.Contract.Identifier, CreationPolicy = PartnerCreationPolicy.CreateAlways)]
private gamepad.XInputGamepadOperations _gamepadPort = new gamepad.XInputGamepadOperations();
我可以看到问题似乎是它正在寻找 xinputgamepad.user
但 MRDS 4 中的引用是 user.xinputgamepad。
有什么想法吗?
I'm trying to implement the simple Robotics example connecting my Lego NXT to MRDS using an xbox controller (Microsoft Robotics Studio and Lego Mindstorms NXT)
Everything compiles fine but when I go to run the service I get the following error:
*** Error creating service. Service type:http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
This is the output of the build:
Not processing file:c:\users\matthew\microsoft robotics dev studio 4 beta\bin\xinputgamepad.y2006.m09.dll
* Contract directory cache refresh complete [10/25/2011 21:22:18][]
*** Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html [10/25/2011 21:22:18][]
*** Exception during service type creation: System.IO.FileNotFoundException: Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
at Microsoft.Dss.Services.Constructor.ConstructService.Process() [10/25/2011 21:22:18][]
*** "TaskExecutionWorker:HandleException": Exception:System.IO.FileNotFoundException: Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
at Microsoft.Dss.Services.Constructor.ConstructService.Process()
at Microsoft.Dss.Services.Constructor.InternalConstructor.CreateNewServiceHandler(ConstructService Create)
at Microsoft.Ccr.Core.Task`1.Execute()
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecuteTaskHelper(ITask currentTask)
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecuteTask(ITask& currentTask, DispatcherQueue p, Boolean bypassExecute)
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecutionLoop()
*** Error creating service. Service type:http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html [10/25/2011 21:22:18][http://buzzman-pc.mex.com.au:40000/constructor]
I'm running Mircosoft Robotics Studio Beta 4 and I know the sample was put together back in 2007 so it could be a mix-up there. This is my partnership code:
[Partner("drive", Contract=drive.Contract.Identifier, CreationPolicy=PartnerCreationPolicy.UseExisting)]
private drive.DriveOperations _drivePort = new drive.DriveOperations();
[Partner("XInputGamepad", Contract = gamepad.Contract.Identifier, CreationPolicy = PartnerCreationPolicy.CreateAlways)]
private gamepad.XInputGamepadOperations _gamepadPort = new gamepad.XInputGamepadOperations();
I can see the problem seems to be that it is looking for xinputgamepad.user
but the reference in MRDS 4 is user.xinputgamepad.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我怀疑您没有安装正确版本的 XNA,因为 XInput 合同中的年份是 2006 年。
最新版本的 Robotics Studio 中应该有非常相似的代码。请看这里:http://msdn.microsoft.com/en-us/robotics/ aa731520
My suspicion is that you don't have the proper version of XNA installed given the 2006 year in the XInput contract.
There should be very similar code in the most recent release of Robotics Studio. Take a look here: http://msdn.microsoft.com/en-us/robotics/aa731520