loading
 
Wifibot
Daka  [4 posts]
13 year
Hi everybody, I'm trying to connect Wifibot (http://www.net-rob.com/page3.php) to Roborealm .The general idea is follow curtain object.I have no problem connecting to the ethernet camera using HTTP read module.The robot has two IP addresses -one for the camera and one for the controller.I had tried using most of the available modules for controlling different robots that are able to use IP addresses but without success.The main purpose is to find a way to control the servo motors through Roborealm.

Any help and suggestions are very welcome.
Anonymous 13 year
Daka,

Good that the camera worked, most likely the other IP address is to their own software that controls the robot. You have a couple possibilities here:

1. Try to contact the vendor you purchased this from and get them to communicate with us in order to create a module. This is the easiest for you but the most unlikely as most vendors will not respond to these kinds of requests ... but you never know you may have some luck.

2. Forward us any information you have on how to communicate with that bot and we can take a quick look to see what may be possible. Ideally this includes source code examples ... but be warned, you may not be able to distribute the code so check their licensing first to see if you can provide it to other parties.

3. Write your own plugin for that bot (hardest and most difficult route).

STeven.

Daka  [4 posts] 13 year
Steven,

Thank you for your response.Contacting the vendor isn't going to help.You know.. things never goes on the easiest way.The actual owner of the bot is the university I'm studying at.
Please find the attached files containing info on the bot.
Can you forward me any kind of info on the 3-th option - writing plugin on my own.

Thank you in advance.

c++API.zip
Anonymous 13 year
Actually the code they provide seems quite straightforward, we'll try contacting them to see if anything can be done in that direction.

In the meantime, in your case the easiest way may be to use the API to write an app that can control the bot and get the needed results from RoboRealm. In that way you will not have to worry about a GUI interface unless you want to create one yourself. The API is well documented with many examples in different languages and you should be able to get up and running quite quickly.

http://www.roborealm.com/help/API.php

If anything comes from our efforts I'll post here.

STeven.
Daka  [4 posts] 13 year
Hi Steven,

Thank you for your help.
While reading the API help I come across with some very basic questions.
1.So, the idea is to write for example  a C/C++ program for the bot.That piece of source code will consist some of the commands presented in the API help( reading variable in this case).
2.While the bot is executing that program it will receive those variables and successfully use them.

Is that the main idea?

Daka.
Anonymous 13 year
Yes, that is the basic concept. Your C/C++ program would include their client code to talk with the robot and our API code to talk with RoboRealm. In essence you are writing a gateway that communicates with both systems and encompasses the logic that you want to perform. Or at least that's one way to do it.

The other possibility is to just write a pure relay getting variables  from RoboRealm and sending them to the bot and instead have your logic within RoboRealm ... either way the scenerio is very similar. The main piece being the ability to communicate to both RoboRealm and the server code they provided.

FYI, we've tried to contact them directly. They are related to RoboSoft which we have meet with in the past but that doesn't mean anything will actually happen. So far, no response. :-(

STeven.
Anonymous 13 year
Hi Steven,

I'm struggling to get variable from Roborealm using API C++.The idea is to write an example program that gets a variable from roborealm(for example FPS) and printed on the screen(simple console app).I have never used API before.Can you help me?

#include "stdafx.h"
#include "RR_API.h"
#define SERVER "localhost"
#define PORTNUM 6060


int main()
{
    int frame;
    API_RR rr;
    if (!rr.connect(SERVER, PORTNUM))
    {
        rr.getVariable("FPS", frame);
    }

    printf("%f", frame);

    
    return 0;
}


Anonymous 13 year
To make things easier for all languages the API pretty much just works with strings or char * in the case of C/C++. So your example would be more like

#include "stdafx.h"
#include "RR_API.h"
#define SERVER "localhost"
#define PORTNUM 6060

int main()
{
    char frame[32];
    float fframe;
    API_RR rr;
    if (!rr.connect(SERVER, PORTNUM))
    {
        rr.getVariable("FPS", frame, 32);
        printf("%s\r\n", frame);
        fframe = atof(frame);
        printf("%f\r\n", fframe);
    }

    return 0;
}

Note that this assumes RR is already running and that the API is enabled.

STeven.    
Anonymous 13 year
1>.\Var.cpp(13) : error C2065: 'API_RR' : undeclared identifier

I'm getting this error.I have included the fail into the folder of the project...

char frame[32];
    float fframe;
    API_RR rr;                                        //Right here..
    if (!rr.connect(SERVER, PORTNUM))
    {


Thank you in advance!
Daka
Anonymous 13 year
Try

RR_API rr;

instead of

API_RR rr;

:-)

STeven.
Anonymous 13 year
Hi Steven,
Sorry to bother you again.
I have attached the log file and cpp file.
I'm trying to get simple variable from RR in order to do that later but from the wifibot.  
Anonymous 13 year
Hi Steven,
Sorry to bother you again.
I have attached the log file and cpp file.
I'm trying to get simple variable from RR in order to do that later but from the wifibot.  
Anonymous 13 year
Hi Steven,
Sorry to bother you again.
I have attached the log file and cpp file.
I'm trying to get simple variable from RR in order to do that later but from the wifibot.  
APISAMPLE.zip
Anonymous 13 year
No problem..

The issue that you are getting is that the compiler does not know about the RR_API file. What you need to do is to add RR_API.cpp to your project file ... exactly the same place where you have the API.cpp specified in VS8.0

Once you add this file to your project the compiler should know where that file is, compile it, and link it into your solution.

Let us know how it goes.

STeven.
Anonymous 13 year
Hi Steven,
The file is added but still there is an error about stdafx.h file..
I have attached the errorLog and project file.

The main idea is once I succeed to get variable from RR the next step is to do it from the bot (include the RR getvariable code in the wifibot source code)
API2.zip

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index