Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   No robot code (http://www.chiefdelphi.com/forums/showthread.php?t=153362)

cnc4 10-01-2017 08:18

No robot code
 
After installing all libraries and imaging the roborio the code seems not to be working sometimes (after several deploys in a row without restarting the roborio).

Every deploy I get a cameraserver exceptions but I choose to ignore it because the code is working fine. But I do get a specific warning when the code fails to run, i will edit this post as soon as i will get it but until then, the warning says that there is a TCP bind on a used port if i remember correctly.

I guess that this is a bug and I would like to see if other teams got this problem too, I hope WPILIB devs will see this post.

AustinShalit 10-01-2017 08:40

Re: No robot code
 
Either post your code here or PM it to me and I will take a look.

AustinShalit 10-01-2017 08:52

Re: No robot code
 
Actually, take a look at this ScreenSteps article. I think it will solve your problem.

http://wpilib.screenstepslive.com/s/4485/m/13809/l/681690

cnc4 10-01-2017 09:49

Re: No robot code
 
Quote:

Originally Posted by AustinShalit (Post 1628461)
Actually, take a look at this ScreenSteps article. I think it will solve your problem.

http://wpilib.screenstepslive.com/s/4485/m/13809/l/681690

Well, I comented everything in init robot so I did not thought that this could happend because of other running code. Thank you, I think that solves the problem :D

tkdberger 12-01-2017 18:30

Re: No robot code
 
Having a similar issue in c++. I've deployed the code several times now to no avail.

AustinShalit 13-01-2017 00:07

Re: No robot code
 
Quote:

Originally Posted by tkdberger (Post 1630210)
Having a similar issue in c++. I've deployed the code several times now to no avail.

Does the Driver Station console show any errors?

cnc4 13-01-2017 08:10

Re: No robot code
 
Quote:

Originally Posted by AustinShalit (Post 1630361)
Does the Driver Station console show any errors?

The same thing still happens, it didnt solved my problem eventually :(.

As I said in the post, its says that the TCP conection is already exist in this port and its faild to Bind();.

Thanks for you help!

AustinShalit 13-01-2017 09:19

Re: No robot code
 
Quote:

Originally Posted by cnc4 (Post 1630414)
As I said in the post, its says that the TCP conection is already exist in this port and its faild to Bind();.

Can you either send me your code or post it here?

euhlmann 13-01-2017 09:43

Re: No robot code
 
Quote:

Originally Posted by AustinShalit (Post 1628461)
Actually, take a look at this ScreenSteps article. I think it will solve your problem.

http://wpilib.screenstepslive.com/s/4485/m/13809/l/681690

Or Thread.setDaemon(true) will allow the JVM to exit while the thread is still running

cnc4 14-01-2017 09:24

Re: No robot code
 
Quote:

Originally Posted by AustinShalit (Post 1630440)
Can you either send me your code or post it here?

How do you want me to send the code? I don't know any good upload site.

This error also occurs in a simple project so I don't know if it will make any difference.

Edit: the error:
Code:

NT: ERROR: bind() to port 1735 failed: Address already in use (TCPAcceptor.cpp:108)

mikearnold514 29-01-2017 14:56

Re: No robot code
 
@AustingShalit
I was looking at issue #465 in GitHub and noticed that this issue was not assigned yet. My team, 514 Miller Place, is having the same issue as reported here. Was wondering if anyone was working this issue and if there was an update.
Kind Regards,
Mike

mikearnold514 30-01-2017 20:41

Re: No robot code
 
Just following up to see if anyone had a resolution to this problem. My team is still experiencing the issue. Will be in the tech room tomorrow night. Was hoping to discuss this with someone to get some ideas on how best to troubleshoot.
Thanks!
Mike

mikearnold514 01-02-2017 08:50

Re: No robot code
 
@Austin
We got around the error we were having with the NT bind() as originally reported here. I updated the GitHub ticket #465 with our code and findings. In short, for anyone looking here, we moved the CameraServer.getInstance().startAutomaticCapture() out of the class constructor of our subsystem and into a regular public method in our subsystem then called that method from RobotInit() like this: Robot.visionUtil.startImageProcessing(); Obviously, folks will use whatever naming is suitable for them. Also, not everyone is using the CommandBasedRobot framework so it might be different for those folks but this is the general idea.

I hope folks find this information helpful and I appreciate the support you have given. You will see in the ticket that I did ask you to review the code as we are not getting any meaningful data from the Pipeline but we can move that to a different topic thread if you think that is best.

Thanks again Austin and kindest regards,
Mike Arnold, Team 514.

cnc4 01-02-2017 18:16

Re: No robot code
 
Quote:

Originally Posted by mikearnold514 (Post 1638949)
@Austin
We got around the error we were having with the NT bind() as originally reported here. I updated the GitHub ticket #465 with our code and findings. In short, for anyone looking here, we moved the CameraServer.getInstance().startAutomaticCapture() out of the class constructor of our subsystem and into a regular public method in our subsystem then called that method from RobotInit() like this: Robot.visionUtil.startImageProcessing(); Obviously, folks will use whatever naming is suitable for them. Also, not everyone is using the CommandBasedRobot framework so it might be different for those folks but this is the general idea.

I hope folks find this information helpful and I appreciate the support you have given. You will see in the ticket that I did ask you to review the code as we are not getting any meaningful data from the Pipeline but we can move that to a different topic thread if you think that is best.

Thanks again Austin and kindest regards,
Mike Arnold, Team 514.

https://github.com/wpilibsuite/allwp...ment-276674779

You wanted a feedback on your code:
My team and me made a visionSensor that implements PIDSource, this sensor is not an subsystem and it return a pidValue in pidGet.
So you can use it inside a PIDController.
Make a pidVisionSourceType to choose what will get in pidValue.
Hope this helps you ;).

mikearnold514 02-02-2017 09:46

Re: No robot code
 
Thanks for the feedback. We were also considering PID Control and would likely try a PID Subsystem. We will definitely consider your approach. We happen to be stuck on trying to get meaningful data from our VisionPipeline and it is likely something silly we are doing that is holding us up now.

As for the original error, I am concluding that by your reply you are past this issue. If that is the case then I would recommend we tell Austin and the WPILib development team that they can close issue #465, if it has not been closed already. But since you opened the issue originally, I will leave that action to you.

Kind Regards,
Mike


All times are GMT -5. The time now is 23:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi