Go to Post This wins this week's award for "Most Bizarre Thread". Carry on. - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #31   Spotlight this post!  
Unread 02-03-2011, 19:40
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Anyone successful with camera in RobotPy?

Please refer to the getting started guide for how to setup the debugger. http://firstforge.wpi.edu/sf/go/doc1197?nav=1
Reply With Quote
  #32   Spotlight this post!  
Unread 02-03-2011, 20:13
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by krudeboy51 View Post
this is the stack view I got:



and the error messege was:
Code:
Error reading context-sensitive help file /"com.windriver.ide.doc.wr_vx_simulator_6.3/wr_workbench_diagnostics_programmers_guide_1.1/html/contexts.xml" (skipping file)
Is this by any chance on a 64-bit machine? I've seen these errors (context-sensitive help file that is) on machines where the WRS workbench didn't install properly. You might try to reinstall Workbench to see if it solves the missing file problem.

As for the camera problem, try a lower resolution like 320x240 and loose the camera compression options. These might be stressing the stack space for the thread and causing the failure. 640x480 is really too big to be shipping across the net anyway at run time.


HTH,

Mike
Reply With Quote
  #33   Spotlight this post!  
Unread 03-03-2011, 17:57
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by taichichuan View Post
Is this by any chance on a 64-bit machine? I've seen these errors (context-sensitive help file that is) on machines where the WRS workbench didn't install properly. You might try to reinstall Workbench to see if it solves the missing file problem.

As for the camera problem, try a lower resolution like 320x240 and loose the camera compression options. These might be stressing the stack space for the thread and causing the failure. 640x480 is really too big to be shipping across the net anyway at run time.


HTH,

Mike
ok, I reinstalled windriver and changed the camera feed size to 320x240, but I got the same problem, but this time when I pressed attach debugger another page popped up in windriver called FRC_paramtask with a list of deadbxx: in which xx varies whether a number or letter and after each deadbaxx: it said "Read access not allowed"

Last edited by krudeboy51 : 03-03-2011 at 18:25.
Reply With Quote
  #34   Spotlight this post!  
Unread 03-03-2011, 23:26
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by krudeboy51 View Post
ok, I reinstalled windriver and changed the camera feed size to 320x240, but I got the same problem, but this time when I pressed attach debugger another page popped up in windriver called FRC_paramtask with a list of deadbxx: in which xx varies whether a number or letter and after each deadbaxx: it said "Read access not allowed"
OK, the deadbxx is a memory poisoning technique to help diagnose problems. The "Read access not allowed" indicates that there is a bad pointer address being accessed by the FRC_paramtask. Now that the debugger is seemingly working, you can now run the debugger (that is launch the robot code as a "debug" run). Make sure that you select to attach to spawned tasks in the debugger set up so you can debug your complete code. It should break on entry to the main code. Set a breakpoint in your robot initialization code where the camera is instantiated and step through the code to see what parameters are being passed. Also, could you post your camera initialization sequence?

HTH,

Mike
Reply With Quote
  #35   Spotlight this post!  
Unread 04-03-2011, 14:50
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by taichichuan View Post
OK, the deadbxx is a memory poisoning technique to help diagnose problems. The "Read access not allowed" indicates that there is a bad pointer address being accessed by the FRC_paramtask. Now that the debugger is seemingly working, you can now run the debugger (that is launch the robot code as a "debug" run). Make sure that you select to attach to spawned tasks in the debugger set up so you can debug your complete code. It should break on entry to the main code. Set a breakpoint in your robot initialization code where the camera is instantiated and step through the code to see what parameters are being passed. Also, could you post your camera initialization sequence?

HTH,

Mike
One question, how do you run robot code as a "debug run?"

CAMERA INITIALIZATION:
Code:
HSLImage image;     //Creates an image
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCamera::kResolution_320x240);
//camera.WriteCompression(20);
//camera.WriteBrightness(0);
Reply With Quote
  #36   Spotlight this post!  
Unread 04-03-2011, 15:16
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by krudeboy51 View Post
One question, how do you run robot code as a "debug run?"

CAMERA INITIALIZATION:
Code:
HSLImage image;     //Creates an image
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCamera::kResolution_320x240);
//camera.WriteCompression(20);
//camera.WriteBrightness(0);
To run a debug session, you right-click the project and select "Debug as" -> Open Debug Dialog instead of "Run as Kernel task". This brings up a dialog screen that will allow you to launch the application under the debugger. Before you launch, make sure you select the "Debug Options" tab and select "Automatically attach to spawned Kernel Tasks" or you won't be able to debug.

Once launched, you'll be asked to switch to the debug perspective. Say "yes". You should see your code in the main view in the center of the screen and a "Debug" view on the upper right hand of the Workbench. Just below that is a "Breakpoints" view. If you right click a line of code in the editor, it should pop up a dialog where you can toggle a breakpoint. This breakpoint will show up in the right-hand breakpoint view.

The Debug view then has a series of small icons along the top that allow you to single step or continue the code. Once you hit a breakpoint, the variables should then show up on the bottom right view "Variables" tab. step through the code and pay particular attention to variables like pointers getting modified. Variables that get modified should be color-coded red.

HTH,

Mike
Reply With Quote
  #37   Spotlight this post!  
Unread 04-03-2011, 16:43
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by taichichuan View Post
To run a debug session, you right-click the project and select "Debug as" -> Open Debug Dialog instead of "Run as Kernel task". This brings up a dialog screen that will allow you to launch the application under the debugger. Before you launch, make sure you select the "Debug Options" tab and select "Automatically attach to spawned Kernel Tasks" or you won't be able to debug.

Once launched, you'll be asked to switch to the debug perspective. Say "yes". You should see your code in the main view in the center of the screen and a "Debug" view on the upper right hand of the Workbench. Just below that is a "Breakpoints" view. If you right click a line of code in the editor, it should pop up a dialog where you can toggle a breakpoint. This breakpoint will show up in the right-hand breakpoint view.

The Debug view then has a series of small icons along the top that allow you to single step or continue the code. Once you hit a breakpoint, the variables should then show up on the bottom right view "Variables" tab. step through the code and pay particular attention to variables like pointers getting modified. Variables that get modified should be color-coded red.

HTH,

Mike
I'll try that right now but just one question, we are not doing image processing so when connecting the camera through the bridge, is there anything I have to add to the code or driverstation to get a live feed more than changing the IP?
Reply With Quote
  #38   Spotlight this post!  
Unread 04-03-2011, 16:57
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by krudeboy51 View Post
I'll try that right now but just one question, we are not doing image processing so when connecting the camera through the bridge, is there anything I have to add to the code or driverstation to get a live feed more than changing the IP?
Not that I'm aware of. If you put the camera on the 10.x.y.0 network, you should be able to see the camera output if you connect directly to the camera's IP.

HTH,

Mike
Reply With Quote
  #39   Spotlight this post!  
Unread 04-03-2011, 17:47
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by taichichuan View Post
Not that I'm aware of. If you put the camera on the 10.x.y.0 network, you should be able to see the camera output if you connect directly to the camera's IP.

HTH,

Mike
Yea, Im not getting a live feed that way, I followed the instructions in the manual to set it to 10.xx.yy.zz but no feed
Reply With Quote
  #40   Spotlight this post!  
Unread 04-03-2011, 17:56
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by krudeboy51 View Post
Yea, Im not getting a live feed that way, I followed the instructions in the manual to set it to 10.xx.yy.zz but no feed
Hmm... Check to make sure that the subnet is set properly (255.0.0.0). You should be able to ping the camera (open a cmd box and do "ping 10.xx.yy.zz"). Also, you should be able to open the camera's web interface via a browser and any device on the same subnet. If you can't ping the camera, then you've got a cable or other connectivity issue.

HTH,

Mike
Reply With Quote
  #41   Spotlight this post!  
Unread 04-03-2011, 18:12
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by taichichuan View Post
To run a debug session, you right-click the project and select "Debug as" -> Open Debug Dialog instead of "Run as Kernel task". This brings up a dialog screen that will allow you to launch the application under the debugger. Before you launch, make sure you select the "Debug Options" tab and select "Automatically attach to spawned Kernel Tasks" or you won't be able to debug.

Once launched, you'll be asked to switch to the debug perspective. Say "yes". You should see your code in the main view in the center of the screen and a "Debug" view on the upper right hand of the Workbench. Just below that is a "Breakpoints" view. If you right click a line of code in the editor, it should pop up a dialog where you can toggle a breakpoint. This breakpoint will show up in the right-hand breakpoint view.

The Debug view then has a series of small icons along the top that allow you to single step or continue the code. Once you hit a breakpoint, the variables should then show up on the bottom right view "Variables" tab. step through the code and pay particular attention to variables like pointers getting modified. Variables that get modified should be color-coded red.

HTH,

Mike
Ok I opened up the debug dialog but there are only three tabs: "main" "source" and "common" there was no debug option tab
Reply With Quote
  #42   Spotlight this post!  
Unread 04-03-2011, 18:28
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by krudeboy51 View Post
Ok I opened up the debug dialog but there are only three tabs: "main" "source" and "common" there was no debug option tab
Look at my presentation on C++:

http://www.chiefdelphi.com/forums/sh...ad.php?t=87598

Towards the middle, you'll see the steps for setting up debugging complete with pictures of what you should see.

HTH,

Mike
Reply With Quote
  #43   Spotlight this post!  
Unread 04-03-2011, 18:42
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: Anyone successful with camera in RobotPy?

Quote:
Originally Posted by taichichuan View Post
Look at my presentation on C++:

http://www.chiefdelphi.com/forums/sh...ad.php?t=87598

Towards the middle, you'll see the steps for setting up debugging complete with pictures of what you should see.

HTH,

Mike
nevermind, i give up trying to fix this thing, i will try to see if I can get it working through the bridge if not then too bad! we are not using it. Thanks for your help though! but one thing, would the stream profile cause this error or not??

Last edited by krudeboy51 : 04-03-2011 at 19:40. Reason: Im giving up
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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