Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Multiple Axis Cams? (http://www.chiefdelphi.com/forums/showthread.php?t=89368)

Anupam Goli 17-01-2011 15:04

Multiple Axis Cams?
 
This may seem an invalid question to consider, but...

Are we allowed to use multiple Axis Cameras? I intend on using one for minibot deployment and one for the scoring of game pieces

(I am not asking this on the Q&A because only our teacher has the password, and she doesn't want to forward it to us, and we have had a week off for school because of the Snow storm that hit the south last week. )

Al Skierkiewicz 18-01-2011 08:12

Re: Multiple Axis Cams?
 
Anupum,
From the First "How To Configure Your Camera" doc...
The camera can also be connected directly to the radio and bypass the cRIO if you choose not to use image processing. To set up the camera this way, the camera IP address is based on team number and is 10.xx.yy.zz, where zz is in the range of 11 to 20. The xx.yy is the same as is used for the robot.
I am going to guess from that statement that a second camera connected to the Dlink would not allow image processing that only the camera connected to the input port on the Crio would be available for processing. Does that work for your application?

Anupam Goli 19-01-2011 20:17

Re: Multiple Axis Cams?
 
Yes it does in fact. The second camera on the arm will not be used for processing image, only for the driver's convenience. Attaching it to the D-link should be fine then. I was already looking into connecting an Ethernet Switch onto the network Camera port on the cRIO, but that would not allow me to program both cameras differently. Is there a guide to connecting the camera to the D-link? If I recall correctly, there is only one ethernet port on the Wireless Receiver (unless using an ethernet switch in this case works)

Al Skierkiewicz 20-01-2011 07:34

Re: Multiple Axis Cams?
 
Anupam,
I would recommend you practice with a camera as you propose before you really commit. It is hard on a driver to switch focus in a short match. You may find it is rarely used and not worth the effort.

tonystark_23 20-01-2011 08:55

Re: Multiple Axis Cams?
 
The D-Link comes with 4 LAN ports on the back. So you can connect the cRio plus 3 other devices. Hope this helps!!
PS: Maybe have the 2nd camera on a different tab in the drivers station to not confuse the driver.

Anupam Goli 20-01-2011 19:41

Re: Multiple Axis Cams?
 
Al,

The driver team is set up so that one driver will be controlling the arm, while the other controls the actual drive train, so each one will be seeing only one camera, and the second one may not be useful at all in some matches, but critical in other matches, as it provides the viewing angle for the person controlling the arm and end effector of the robot. Also, would R3 prevent me from placing an ethernet switch on the linksys receiver and having one port go to the cRIO and the other going to the camera?

Al Skierkiewicz 22-01-2011 08:31

Re: Multiple Axis Cams?
 
If I understand your question, the Linksys is no longer allowed. The Dlink is the new wireless adapter and it has four ports.

Anupam Goli 22-01-2011 18:08

Re: Multiple Axis Cams?
 
I was referring actually to the WLAN receiver on the robot, not the router to broadcast the network.

Alan Anderson 23-01-2011 01:54

Re: Multiple Axis Cams?
 
Quote:

Originally Posted by Wing (Post 1005834)
I was referring actually to the WLAN receiver on the robot, not the router to broadcast the network.

The D-Link DAP-1522 router is the wireless networking device on the robot. It's there to "broadcast the network" so your Driver Station (and programming computer) can connect to it. There is no other router, access point, or bridge used in the control system this year.

Al Skierkiewicz 23-01-2011 09:38

Re: Multiple Axis Cams?
 
As Alan has pointed out the Dlink is your new robot radio and a router thrown in. Take your old linksys home or put it too good use somewhere else. It cannot be on the robot this year.
<R52> One D-Link DAP-1522 is the only permitted mechanism for communicating to and from the ROBOT during the MATCH. All signals must originate from the OPERATOR CONSOLE and/or the Field Management System, and be transmitted to the ROBOT via the official ARENA hardware. No other form of wireless communications shall be used to communicate to, from or within the ROBOT (e.g. radio modems from previous FIRST competitions and Bluetooth devices are not permitted on the ROBOT during competition).

PhilBot 23-01-2011 12:34

Re: Multiple Axis Cams?
 
My question is: "Is it legal to connect one or more cameras to the D-Link in order for the robot to do image processing from 2 cameras ((either symultaniously (for stereo vision) or independantly (for line/target tracking)"

It's clear that the camera is normally plugged into the cRIO port 2, but is it legal to plug another one into the D-LINK?

I think the cRIO code should be able to access either one (just with different IP addresses).

My reason for a second camera is that there are some VERY COOL camera-based line tracking code examples on NI and I'd love to try them, but I don't want to have to pivot the camera up for Peg tracking.

Phil.

chris janney 23-01-2011 18:06

Re: Multiple Axis Cams?
 
i am also interested in this question. can someone post quickly

tutkows1 23-01-2011 20:30

Re: Multiple Axis Cams?
 
Cameras are consider COTs, so yes.

BEASTistheB2ST 24-01-2011 15:53

Re: Multiple Axis Cams?
 
:confused: Sorry, but I am really lost in all of this technological terminology. I believe the answers been hinted at, but not plainly said, so: are we allowed to use more than one camera on are robot, for better viewing of the field, or not? I know people keep talking about a four-input DLink thing, but does that mean we can use up to for cameras? I'm sorry, but I really don't understand!!! I didn't see any other posts about it...

Alan Anderson 24-01-2011 16:36

Re: Multiple Axis Cams?
 
Quote:

Originally Posted by BEASTistheB2ST (Post 1007270)
I know people keep talking about a four-input DLink thing, but does that mean we can use up to for cameras?

The D-Link DAP-1522 is the white "robot radio". It is a network router with four Ethernet ports and a Wi-Fi connection. One of its ports must go to the cRIO. That leaves three ports unclaimed for whatever you want to connect to them. The other port on the cRIO is also available for your use.

If you can figure out how to communicate with them, you can use as many commercial, off-the-shelf cameras as you want on your robot (subject to weight, volume, and budget limitations, of course). An eight-port network switch (does anyone even make "dumb" hubs anymore?) would give you the ability to connect six additional devices.

I don't know what network addresses will be available for you to use during competition. It might be that only a camera connected through the cRIO will be viewable on the Driver Station. In that case, you'll need to find a way to select which camera gets its data forwarded and thus seen on the Dashboard display.

Anupam Goli 25-01-2011 22:45

Re: Multiple Axis Cams?
 
I finally understand that the white Dlink goes on our robot, sorry that was a goof on my part. And we can use our own custom laptops for the driver station, so we could technically have a mozilla browser open to the ip of the camera, and just make that take up half the screen with the rest of the driver station take up the rest.

tomy 26-01-2011 07:22

Re: Multiple Axis Cams?
 
Quote:

Originally Posted by Al Skierkiewicz (Post 1006298)
As Alan has pointed out the Dlink is your new robot radio and a router thrown in. Take your old linksys home or put it too good use somewhere else. It cannot be on the robot this year.
<R52> One D-Link DAP-1522 is the only permitted mechanism for communicating to and from the ROBOT during the MATCH. All signals must originate from the OPERATOR CONSOLE and/or the Field Management System, and be transmitted to the ROBOT via the official ARENA hardware. No other form of wireless communications shall be used to communicate to, from or within the ROBOT (e.g. radio modems from previous FIRST competitions and Bluetooth devices are not permitted on the ROBOT during competition).



So we can use a second camera if we put it our cots/bill of materials?

omalleyj 26-01-2011 07:37

Re: Multiple Axis Cams?
 
I have also been contemplating a second camera. The ethernet port is there, but can I power it? The wiring diagram still shows the camera connected to the 5V supply on the PDB and you typically are not allowed to wire multiple devices to the same connector. Are we allowed to wire it as a custom circuit with a converter? I am still looking but I haven't seen anything yet.

Al Skierkiewicz 26-01-2011 07:49

Re: Multiple Axis Cams?
 
These are good questions for the Q&A.

tomy 26-01-2011 13:43

Re: Multiple Axis Cams?
 
you can power it with a second side card i just want to know if you can do it?

cause if you connected a camera to the crio the clam can use it for the drivers. then if you cennect another to the d-link router your team mates could connect to it to watch the game from the camera instead of the stands right?

Alan Anderson 26-01-2011 20:15

Re: Multiple Axis Cams?
 
Quote:

Originally Posted by tomy (Post 1008832)
you can power it with a second side card i just want to know if you can do it?

cause if you connected a camera to the crio the clam can use it for the drivers. then if you cennect another to the d-link router your team mates could connect to it to watch the game from the camera instead of the stands right?

I really don't understand what you want to know. What is a "second side card"? What is "the clam" supposed to be? See if you can find someone to help you ask your question in a less cryptic fashion.

tomy 26-01-2011 20:17

Re: Multiple Axis Cams?
 
okay there is the digital side card which you plug the pwms into.... that is not were the camera gets power...

Alan Anderson 26-01-2011 21:01

Re: Multiple Axis Cams?
 
Quote:

Originally Posted by tomy (Post 1009139)
okay there is the digital side card which you plug the pwms into.... that is not were the camera gets power...

The Digital Sidecar has absolutely nothing to do with the camera (except maybe to provide control to servos on a pan/tilt mount if you use one). The camera has its own dedicated 5 volt power connection on the Power Distribution Board.

tomy 26-01-2011 21:03

Re: Multiple Axis Cams?
 
so then you couldn't have two camera's cause you would need two power distribution boards

Alan Anderson 26-01-2011 21:26

Re: Multiple Axis Cams?
 
Quote:

Originally Posted by tomy (Post 1009202)
so then you couldn't have two camera's cause you would need two power distribution boards

Additional cameras would fall under the category of custom circuits. You can provide power to them using a 20-amp circuit from the Power Distribution (plus whatever voltage regulation they might require).

Anupam Goli 26-01-2011 21:27

Re: Multiple Axis Cams?
 
T-junction wiring.

tomy 26-01-2011 21:30

Re: Multiple Axis Cams?
 
mhmm that sounds like fun T-junction i might have to try that

Anupam Goli 26-01-2011 21:34

Re: Multiple Axis Cams?
 
Yea, we did that to the cRIO last year and the solenoid breakout.

tomy 26-01-2011 21:36

Re: Multiple Axis Cams?
 
how hard is it to do?

and how safe is it?

Anupam Goli 26-01-2011 22:00

Re: Multiple Axis Cams?
 
I'm not sure about safety, but all you do is take another wire, put it across the main one going to your first camera, and solder it in a T-splice.

tomy 26-01-2011 22:03

Re: Multiple Axis Cams?
 
sounds easy enough

321liftoff 28-01-2011 12:06

Re: Multiple Axis Cams?
 
Has anyone had any success with viewing two cameras on the Driver Station?

We are using LabVIEW. Our setup has two Axis cameras (10.xx.yy.90 and 10.xx.yy.91 addresses) on the D-Link with the cRIO (10.xx.yy.2 address). We can put either of the camera addresses as an input to the "Camera Open" VI in the "Begin". Each camera functions correctly when setup this way.

Our idea is to have the robot send one camera feed, then have the user press a button to switch cameras and start sending the other camera feed. We are only using the cameras for the drivers to get a better view, not to do image processing.

Implementation #1
We put .90 in the Begin code to start sending camera images to the Driver Station. In the Vision processing, we setup some code to run "Camera Close" on the current camera reference and run "Camera Open" on the .91 address when a joystick button is pressed.

When running the code, the camera sends images as normal. When the button is not pressed, the .90 camera continues to send images. When the button press occurs, the "Camera Close" code seems to lock up our program and no images are sent.

We haven't delved too deep into the camera code, but we think that the "Camera Close" code kills the camera's connection to the Driver Station. Can someone confirm?

Implementation#2
Another idea is to modify the driver station and have a webbrowser view the camera feed and we could switch between camera feeds on the dashboard. We think this implementation would be technically feasible and would actually provide a better image for the team. It would also take the cRIO out of the imaging loop. Is viewing the Axis camera by webbrowser instead of through the cRIO/Dashboard interface allowed by the rules? Will sending the camera data by this method consume too much bandwidth for the Field Management System?

elbuo 03-02-2011 11:34

Re: Multiple Axis Cams?
 
Have you tried this already?

I think method #1 would be the way to go. Just don't close the camera before the end and you will be fine.

apalrd 03-02-2011 11:49

Re: Multiple Axis Cams?
 
If you dig deep enough into the camera VI's, you will see that it gets the image over HTTP from the camera. If you find the right VI's (WPI_CameraIsssue HTTP Request With Authentication.vi and WPI_CameraRead JPG.vi especially), you can make copies of them (with different names) in your code folder, modify them all to call the correct copy, and use them on the Dashboard to get the image directly from the camera.

If you had WPI_CameraIssue HTTP Request With Authentication.vi, WPI_CameraRead JPG.vi, and WPI_CameraDecodeJPEGString.vi, you could get the image as a LabVIEW image and use it just like any other part of the Dashboard.

This would require that both cameras were directly connected to the D-Link router, and not the cRio. It would probably be faster than running through the cRio anyway. Since all communications to the camera happens on port 80, it is allowed by the field.

Super important note: The cRio would have no control of the cameras at all. The Dashboard information packet would have to include which camera to use.

321liftoff 03-02-2011 13:05

Re: Multiple Axis Cams?
 
Thanks for the detail! Here's what we ended up implementing:

We put a webpage window on the dashboard using code from Labview's Example Finder: see the link here. We created two html files, one for each camera, using the htmlcode provided by Axis to connect to the camera video feed over http. I used the code from the link above because it removed all text and borders around the video feed. We put a switch in the dashboard code to switch between these two html files within the one webpage window, causing the video feed to switch. The quality is definitely better than that of the feed provided by cRIO processing.

Using the existing VIs, as you suggest, to get the images may be a simpler solution because you don't have to mess with managing html files separate from the Labview dashboard code.

Anupam Goli 03-02-2011 19:43

Re: Multiple Axis Cams?
 
I was actually thinking of just running a firefox window in the background with a laptop of resolution 1920 x 1080, but i knew that probably wouldn't take me far.

keericks 04-02-2011 01:06

Re: Multiple Axis Cams?
 
I've seen a couple of folks in this thread inquiring about running the camera directly through the switch (legally bypassing the cRio) and then viewing the stream via web browser session on the driver station pc. Is the use of simple web browser legal, or must we rewrite the dashboard to accommodate connecting to the camera via the switch?

waialua359 04-02-2011 01:15

Re: Multiple Axis Cams?
 
team 375 used two cameras and got lots of awards for it, in 2007.

jcbc 04-02-2011 09:54

Re: Multiple Axis Cams?
 
Quote:

Originally Posted by keericks (Post 1015365)
I've seen a couple of folks in this thread inquiring about running the camera directly through the switch (legally bypassing the cRio) and then viewing the stream via web browser session on the driver station pc. Is the use of simple web browser legal, or must we rewrite the dashboard to accommodate connecting to the camera via the switch?

I haven't seen anything in the rules saying that we can't connect to the camera over HTTP 80 or HTTP 443 using a Web browser. That's what we're planning on doing. We make the camera feed full screen from the browser and then put the Driver Station window on top of the full screen feed. The Driver Station covers the bottom part of the camera feed (we're going to test to make sure we still see enough of the camera view to be useful), but the rules state that the Driver Station must be visible throughout a match so we have to have it on the screen too.

Greg McKaskle 06-02-2011 10:35

Re: Multiple Axis Cams?
 
1 Attachment(s)
decibel.ni.com seems to be down, but there should soon be a tutorial up about integrating mpg support into the dashboard. I've attached the core VI and I'll explain how it is used.

This VI expects for the camera to be plugged into the switch and be accessible to the dashboard. The camera needs a team IP such as 10.te.am.11. When correct, you will be able to log into the camera from other te.am computers such as the dashboard, programming laptops, etc. You log into it by typing the IP address into the web browser, and the camera will ask for a login and will show test image and let you change settings.

You will also be able to use NI Vision Assistant to the camera without any cable or IP changes. Just type the camera IP into the field inside Vision Assistant. You don't even need code or a cRIO, just power to the camera and dlink.

Finally, the attached VI is a replacement for the Get Image From Controller VI in the default dashboard. This VI will initiate an MJPG stream with the camera, and process it just a bit differently than the Read JPG that apaird mentioned. The IP needs to the be the camera IP, not the cRIO. Also, if you change parameters to the session, you should reopen the connection.

I haven't used this enough to know exactly how this will interact with any jpg requests from the cRIO, but if this is used exclusively for dashboard updates, it has performance advantages in that it allows the camera to overlap acquisitions with other operations. I was able to use three camera at 640x480 at near 30fps. The limit was the old laptop's ability to decode the images.

Greg McKaskle

computergeek125 13-07-2011 11:59

Re: Multiple Axis Cams?
 
We don't have two cameras to use, but our robot is configured to do so. I've actually got our camera and vision processing to run directly from the dashboard, while [attempting] to send the vision state back to the robot for processing. The ReadMJPEG.vi is helpful in this process! Before I came to this, i figured out that the Open Camera.vi will target a connection on cRIO port 1 when I changed the IP of the camera to 10.xx.yy.8. So, the camera was on the D-LINK for access from a computer if need be. As for power, the Axis camera ended up next to the 5v converter for the D-LINK physically, so it got tied in to that circut. THIS PASSED INSPECTION. If we ever added another camera, it could be put on the 5v regulated output on the power distribution board, and be connected to the D-LINK for net access, probably on 10.xx.yy.9. Images that come through on Read MJPEG.vi also are more in real-time, rather than a slight delay. Modifying the Image Processing.vi was as simple as getting rid of the access camera Device Reference, changing the "Original" display to be a control (right-click menu), and connecting the new control to one of the pins on the Vision Processing.vi icon. Then wire the output of Read MJPEG.vi to that pin (assuming that Vision Processing is now in the loop on the dashboard that has all of the vision stuff)

As for simultaneous image requests, I have not experimented with the Read MJPEG.vi either, but I do know that the cRIO image stream (Open Camera.vi / Get On PC.vi) stops when I log in as an HTML user with a web browser, however, 2 computers using HTML can simultaneously view the image stream. I assume the Read MJPEG.vi works similarly.

computergeek125 01-08-2011 16:50

Re: Multiple Axis Cams?
 
EDIT TO ABOVE POST:
The loop condition terminal IN the Vision Processing.vi (the stop sign, probably at the bottom right of the while loop) needs to have a boolean false constant instead of a true, or you could just remove the loop by right-clicking the gray part, and selecting "Remove while loop".

plnyyanks 30-08-2011 07:49

Re: Multiple Axis Cams?
 
reported


All times are GMT -5. The time now is 07:27.

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