|
|||||||
| General Forum Open Discussion of the VEX Robotics System that can be answered by anyone. VEX Robotics Engineers will not answer questions posted here; see Official VEX Technical Support below. |
![]() |
|
|
Thread Tools |
|
#21
|
||||
|
||||
|
Re: VEXpro - Communicating with external software
Paul,
Thanks so much for your posts. I had tried to contact you earlier through the DPRGs general contact email for help, but never heard back from anyone. I haven't really worked on the project since February. With the help of quasar and jpearman, I was finally able to get the video feed in Roborealm. That's as far as I was able to get though. I still hadn't figured out how to send information from Roborealm back to the VEXpro so I could access it and use it to control a robot. I've learned a lot since I bought my VEXpro, but my programming skill set isn't anywhere near quasar's, jpearman's, or your's. I'm basically one of those people you referred to in your article who wouldn't have the skills to be able to program the VEXpro. I bought it because I was hoping to "grow" into it and because I wanted to be able to do things like the project in your article. There have been many times when I've thought that I should have just bought the Cortex and stuck with EasyC - a graphical block based C programming software. Any help that you could give me would be great! |
|
#22
|
||||
|
||||
|
Re: VEXpro - Communicating with external software
Hi Allen,
I'm sorry you were unable to reach me through the DPRG email. I'll check & find out what's going on. FYI, you'll find me in the members list and can send email from there. I'm glad you got video to Roborealm, but sorry you found it hard going. But never fear - there's nothing like learning by doing. frameProcessor.java has 2 functions of interest: frame2Roborealm() sends an image to Roborealm. Read the API section of the Roborealm docs to find out what it does. getShapeData() gets the X & Y coordinates of the shape Roborealm found. Documented in the API section of Roborealm. Look at the function getVisualHeading() in watchVideo.java for an example of how to send an image to Roborealm and get its coordinates back. Then you can use the X & Y location to decide which way to turn the robot. This code runs on the laptop. If you want to run on VexPro, hang on a week - I'm working on getting vexPro to talk directly to Roborealm. I assume you have a standard vex robot with a couple of wheel motors driven from VexPro - is that correct? And you want to seek to something using the camera? Paul |
|
#23
|
||||
|
||||
|
Re: VEXpro - Communicating with external software
Hi Paul,
That's OK. I admit I was kind of disappointed at the time, but things happen. I just appreciate your help now. Getting the video set up really wasn't too bad - jpearman helped me out a lot. He made an executable jar file of watchVideo for me, told me how to run it, and told me how to check to see if my VEXpro was seeing the webcam. While trying different things, I learned that I could actually get a command prompt and run watchVideo from the Terk IDE. I looked at the those sections of the code, but I don't really understand how they work. If it runs on my laptop - how would I acess the information to control a robot? Something that would run on the VEXpro allowing it to talk with Roborealm directly sounds great. That's what quasar and jpearman were trying to help me do when I decided to take a break. Quasar had provided a link to a document on socket communications with simple client and server program examples. I was also looking at the socket interface on Roborealm. When I contacted Roborealm, they were interested in this too. They had seen your article and said they would try working the purchase of a VEXpro into their budget. I don't have a specific robot to control at the moment. Basically, I just wanted to be able to send video from the VEXpro to Roborealm, have it process the image and send whatever information I select back to the VEXpro, and then use it to control whatever robot I build. I was interested in both avoiding objects and seeking them using the video. I just didn't know how to do that myself and when I saw the project in your article and it mentioned being able to do that - I thought this is great! Last edited by vexbot; 05-02-2012 at 10:13 PM. Reason: Spelling |
|
#24
|
||||
|
||||
|
Re: VEXpro - Communicating with external software
I've built a couple of programs you might be interested in:
RRTest: runs the Roborealm API test from the VexPro rrClient: sends images from a VexPro-connected webcam to roborealm and pulls back data about the shape from the Shape_Match module. There's a sample .robo program in the directory. They can be checked out of svn at: http://svn.dprg.org/repos/dprg/VEXPro/trunk/rrTest http://svn.dprg.org/repos/dprg/VEXPro/trunk/rrClient There's a README.txt in each that tells how to build & run them. rrClient is really what you were asking for: a way to determine the position of a recognized object on the vexpro, so you can control the robot to seek to it or something along those lines. Post if you have questions. Enjoy! Paul |
|
#25
|
|||
|
|||
|
Re: VEXpro - Communicating with external software
Maybe Paul can report back after the DPRG contest coming up on how well this works in a contest
![]() |
|
#26
|
||||
|
||||
|
Quote:
I'm sorry it's been awhile. I haven't had a chance to try out the rrClient program yet, but I have been looking over the files trying to see how it works. Quote:
I'm not really sure how everything works, especially without trying it, but I have a few questions: 1). Is there any set up I need to do in RoboRealm? I was wondering if I needed to setup/use their Socket Interface Module to communicate with your program or does your program handle everything? 2). How hard would it be to use another variable? I saw the section of code in the RR_API.cpp file that gets the information from the Shapes Module, but further down I also saw some other code for reading and setting the value of a variable. This is just the first section of code I came across for reading a variable: Code:
/*
Returns the value of the specified variable.
name - input - the name of the variable to query
result - output - contains the current value of the variable
max - input - the maximum size of what the result can hold
*/
bool RR_API::getVariable(char *name, char *result, int max)
What is the code for setting the value of a variable used for? Can I set the value of a variable and have RoboRealm read it? Code:
/*
Sets the value of the specified variable.
name - input - the name of the variable to set
value - input - contains the current value of the variable to be set
*/
bool RR_API::setVariable(char *name, char *value)
Any further assistance that you could give me would be great! I can follow some of the code, but most of it is over my head. |
|
#27
|
|||
|
|||
|
Re: VEXpro - Communicating with external software
Paul is on a business trip will let him know about your post. Which he may not answer till after ROScon this weekend.
|
|
#28
|
|||||
|
|||||
|
Re: VEXpro - Communicating with external software
Sorry for the slow reply.
Here's a video of me doing a 3-minute lightning talk on the work we're doing to integrate VexPRO with ROS down here at the Dallas Personal Robotics Group: http://youtu.be/ThN2c0rXj3k Jason challenged me to report how well Roborealm worked at Roborama contest the weekend before last. Here's a video of vexpro on Roomba seeking to an orange can: http://youtu.be/1BjE6****vQ OK - sorry but youtube gave me a URL with a swear word embedded in it, and the bulletin board is filtering it. Here it is spelled out. Type all the letters together and you should get it. http://youtu.be/1BjE6F U c K vQ Sorry for the swear word - it was youtube. First time this has happened. It worked really well. Picked out the can & seeked right to it. rrclient is doing the video & depositing the parameters in shared memory, & a program that's also in the svn repository at the same location as rrclient, Roborama2012, is picking it up & doing the driving. Quote:
Quote:
# telnet <pc_ip_address> 6060 If it connects, then you're good. You might need to declare your network a home network. Google for instructions on firewalls Quote:
Quote:
Quote:
regards Paul |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|