Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1
Send Topic Print
Command Stream. (Read 5089 times)
g.holmes
YaBB Newbies
*




Posts: 21
Command Stream.
04/19/09 at 6:21am
 
Hi, I'm having problems finding the output for the output stream for the commands. Basically i modified the SRV1Console to connect to a basic java server application. It connects. I forwarded the variable:
 
cmdBytes
 
in _sendSRVCommand()
 
as i saw that to be the finalised command.
 
But it didn't send anything.
So i made a new connection within the client code and sent the variable:
 
cmd
 
in the same function. which is the variable before it gets run through the process. and that outputs for example forward = 4D323200
 
So i guess my question is, could you tell me what happens between cmd variable and the final output to the socket? And what the output would be for forward.
 
Thanks for your time.
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: Command Stream.
Reply #1 - 04/19/09 at 7:02am
 
SRV1Console.java doesn't process the response from commands except for 'I' (send image).  However, there is response processing to commands in SRV1Test.java.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
g.holmes
YaBB Newbies
*




Posts: 21
Re: Command Stream.
Reply #2 - 04/19/09 at 12:16pm
 
Quote from admin on 04/19/09 at 7:02am:
SRV1Console.java doesn't process the response from commands except for 'I' (send image).  However, there is response processing to commands in SRV1Test.java.

 
I'm sorry, i hope you can be patient with me, but i have a couple more questions that i can't figure out. Even after hours of looking for the answers.
 
The first is. How does the robot get the command such as "move forward" if SRV1Console.java doesn't send a command to it other than I(send Image)?  
 
The second is, what is the exact string or integer that is sent to the robot for each of the buttons? Where would i find this?  
 
the SRV1Test and SRV1Console connects to the server application i have made, but what i cant get is either of the two clients to send any commands to the server application.  
 
 
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: Command Stream.
Reply #3 - 04/19/09 at 1:12pm
 
The commands are sent from sendSRVCommand(), but no return data from the robot is processed, with the exception of the 'I' command
 
You can find the command strings and corresponding graphics for the buttons in srv.config
 
Back to top
 
« Last Edit: 04/19/09 at 1:14pm by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
g.holmes
YaBB Newbies
*




Posts: 21
Re: Command Stream.
Reply #4 - 04/19/09 at 1:54pm
 
Quote from admin on 04/19/09 at 1:12pm:
The commands are sent from sendSRVCommand(), but no return data from the robot is processed, with the exception of the 'I' command

You can find the command strings and corresponding graphics for the buttons in srv.config


 
I'm sorry, i didnt mean a response from the robot. Basically this is what i've done:
 
Modified the SRV1Console application to connect to 'localhost' on a different port ie (3019)
i have written an application, which acts as a server application. This listens on port 3019.  
 
I start the server app which automatically listens on that port.
The modified SRV1Console connects to that server application.
The server app recognises a connection is made.
But it wont register the data as being sent from SRV1Console.
 
so should it work if i further develop on my server application to include new sockets, to connect to the robot. and just forward on to the robot what is sent from the SRV1Console.  
 
For example:  
 
button.2=buttons/forward.png
command.2=4D323200
 
4D323200 as the move forward command?
Or does that need to be modified to be registered as a command from the robot?
 
Again, i apologise for this, i am just on a deadline and having severe issues.
 
Thank you.
Back to top
 
« Last Edit: 04/19/09 at 1:58pm by g.holmes »  
  IP Logged
g.holmes
YaBB Newbies
*




Posts: 21
Re: Command Stream.
Reply #5 - 04/19/09 at 2:01pm
 
The following link shows the code that i am having issues with in SRV1Console.  
The part i don't understand is the lines 13 onwards. I don't understand what is going on there.
 
 
http://pastesite.com/6539/password545
 
 
say for example the variable cmd is 4D323200 (forward)
it then goes into that for loop, and the outcome is never exactly the same, this i can't figure out as i can't understand what goes on there.
 
Thank you very much
Back to top
 
« Last Edit: 04/19/09 at 2:01pm by g.holmes »  
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: Command Stream.
Reply #6 - 04/19/09 at 2:10pm
 
I am probably still confused about your objective.  
 
SRV1Console has a built-in web server.  Are you trying to remotely send commands to that server which are relayed to the robot ?  If so, you need to take a look at the web page that is generated by SRV1Console -
    http://localhost:8888/view
 
If you view the page source, you'll see a variety of CGI commands that effectively activate the buttons remotely.
 
<a href="/cgi-bin/srv.cgi?button=1" target="srv_status"><img border=0 src="/buttons/driftleft.png"></a>
</td>
<td>
<a href="/cgi-bin/srv.cgi?button=2" target="srv_status"><img border=0 src="/buttons/forward.png"></a>
</td>
 
Does this help ?
 
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
g.holmes
YaBB Newbies
*




Posts: 21
Re: Command Stream.
Reply #7 - 04/19/09 at 2:25pm
 
Quote from admin on 04/19/09 at 2:10pm:
I am probably still confused about your objective.  

SRV1Console has a built-in web server.  Are you trying to remotely send commands to that server which are relayed to the robot ?  If so, you need to take a look at the web page that is generated by SRV1Console -
   http://localhost:8888/view

If you view the page source, you'll see a variety of CGI commands that effectively activate the buttons remotely.

<a href="/cgi-bin/srv.cgi?button=1" target="srv_status"><img border=0 src="/buttons/driftleft.png"></a>
</td>
<td>
<a href="/cgi-bin/srv.cgi?button=2" target="srv_status"><img border=0 src="/buttons/forward.png"></a>
</td>

Does this help ?


 
Ah.. It's not the newer model of the SRV1. It's the one that connects via Zigbee USB signals.
I basically need to modify the SRV1Console to connect to a proxy application rather than directly to the robot. This would allow me to make a connection with the Console application to the Robot via the server over the Internet. I have the Console connecting to the Server application. The only problem is the commands need to be sent. and i don't understand this.
 
Thank you.
 
Oh, also the URLs in that src:
 
<a href="/cgi-bin/srv.cgi?button=2" target="srv_status"><img border=0 src="/buttons/forward.png"></a>
 
 
There isnt a /cgi-bin/ in the directory. and a search for srv.cgi isnt found either.
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: Command Stream.
Reply #8 - 04/19/09 at 2:59pm
 
While the firmware's SRV_protocol command set has changed from http://www.surveyor.com/SRV_protocol_arm7.html to http://www.surveyor.com/SRV_protocol.html, SRV1Console is basically unchanged from the original ARM7 robot support, except that it has TCP as well as serial connection support.  
 
You won't find a cgi-bin directory - this functionality is built into the webcamsat module that is internal to SRV1Console.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Pages: 1
Send Topic Print