pi-top / pi-top-4-.NET-SDK

pi-top [4] .NET Core SDK with .NET Interactive Extensions
MIT License
49 stars 6 forks source link

Rover code doesn't work on a pi-top #20

Closed m-roberts closed 4 years ago

m-roberts commented 4 years ago
pi@pi-top:~/pi-top-4-.NET-Core-API $ dotnet /home/pi/pi-top-4-.NET-Core-API/src/Examples/PiTop.Interactive.Rover/bin/Debug/netcoreapp3.1/PiTop.Interactive.Rover.dll --http-port 1024
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.AggregateException: One or more errors occurred. (No such file or directory)
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at PiTop.Camera.StreamingCamera.Connect() in /home/pi/pi-top-4-.NET-Core-API/src/PiTop.Camera/StreamingCamera.cs:line 35
   at PiTop.ConnectedDeviceFactory`2.GetOrCreateDevice[T](TConnectionConfiguration connectionConfiguration, Func`2 deviceFactory) in /home/pi/pi-top-4-.NET-Core-API/src/PiTop/ConnectedDeviceFactory.cs:line 67
   at PiTop.ConnectedDeviceFactory`2.GetOrCreateDevice[T](TConnectionConfiguration connectionConfiguration) in /home/pi/pi-top-4-.NET-Core-API/src/PiTop/ConnectedDeviceFactory.cs:line 53
   at PiTop.Camera.PiTopModuleExtensions.GetOrCreateCamera[T](PiTop4Board module, Int32 index) in /home/pi/pi-top-4-.NET-Core-API/src/PiTop.Camera/PiTopModuleExtensions.cs:line 54
   at PiTop.Interactive.Rover.RoverRobotSetup.ConfigureRover(CSharpKernel csharpKernel) in /home/pi/pi-top-4-.NET-Core-API/src/Examples/PiTop.Interactive.Rover/RoverRobotSetup.cs:line 50
   at PiTop.Interactive.Rover.RoverRobotSetup.SetupKernelEnvironment(CSharpKernel csharpKernel) in /home/pi/pi-top-4-.NET-Core-API/src/Examples/PiTop.Interactive.Rover/RoverRobotSetup.cs:line 40
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at PiTop.Interactive.Rover.CommandLine.CommandLineParser.CreateKernel(FrontendEnvironment frontendEnvironment, StartupOptions startupOptions) in /home/pi/pi-top-4-.NET-Core-API/src/Examples/PiTop.Interactive.Rover/CommandLine/CommandLineParser.cs:line 218
   at PiTop.Interactive.Rover.CommandLine.CommandLineParser.<>c__DisplayClass2_0.<Create>b__4(StartupOptions startupOptions, IConsole console, InvocationContext context, CancellationToken cancellationToken) in /home/pi/pi-top-4-.NET-Core-API/src/Examples/PiTop.Interactive.Rover/CommandLine/CommandLineParser.cs:line 140
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Delegate.DynamicInvoke(Object[] args)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__21_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__22_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
m-roberts commented 4 years ago

@colombod has advised that is because the camera requires the mjpeg streamer, and the process is not found. this is something being discussed with @PiTopRyan.

@paulmey - I'm told that you are able to help with this?

m-roberts commented 4 years ago

Fixed in #22