Announcement

Collapse
No announcement yet.

Robotino 2 - C++ Programming from ground up

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Robotino 2 - C++ Programming from ground up

    Hi everyone,

    I'm planning to program the Robotino 2 with C++. However, the instruction from RobotinoWiki here provided not much information for me. There are a lot of question which I can't understand since I'm still new to this system. Can someone give me a brief explanation or tutorial on how can I program it using C++?!
    Below are some questions which I couldn't find a clear explanation/instruction:
    1. Is API a group of header file which I need to include in my main.c?
    2. What does it mean to "install" the API and how can I use it? The instruction here from quickstart for Windows has completely no information at all!
    3. How can I install it?! Do I have to install it on the Robotino too?!
    4. What is the API2 Deamon?
    5. What is "Building API2 from sources"?
    6. I did try to figure out how the API works by reading some of the .h files here but CANNOT UNDERSTAND the structure of it! Can anyone help me here?!?!?!?
    There will be more?! But all of the above are the most crucial one for me right now.

    Thanks so much for your support and have a nice day!

  • #2
    Hi nhphuong,
    maybe a can answer some of your questions:
    1. In general an API is a description of how to interact with a specific system. So in this case the API defines functions that you can use to interact with the robot. And yes, in case you want to use such functions in your code, you need to include the respective header files.
    2. Installing the API means to make your development environment aware of the API functions. In general this means to put the header files on your pc and add a system path for them so that your compiler can find them. So for Windows it seems that you can just use a binare installer (I never tested it) which does everything for you.
    3. You don't need to install it on Robotino. First, it should be there already, second, if you don't compile your code on the robotino directly you don't need the API headers there.
    4. I don't exactly know what you mean here. There is a daemon running on the robotino which your code can talk to. This daemon provides the connection to the Robotiono funcitonality.
    5. This is kind of a manual installation of the API files. If the automatic methods don't work for you.
    6. The easiest way is to have a look at the already provided examples. They show how to include the header files and how to use the functions of the robot.

    Comment


    • #3
      Originally posted by misken View Post
      Hi nhphuong,
      maybe a can answer some of your questions:
      1. In general an API is a description of how to interact with a specific system. So in this case the API defines functions that you can use to interact with the robot. And yes, in case you want to use such functions in your code, you need to include the respective header files.
      2. Installing the API means to make your development environment aware of the API functions. In general this means to put the header files on your pc and add a system path for them so that your compiler can find them. So for Windows it seems that you can just use a binare installer (I never tested it) which does everything for you.
      3. You don't need to install it on Robotino. First, it should be there already, second, if you don't compile your code on the robotino directly you don't need the API headers there.
      4. I don't exactly know what you mean here. There is a daemon running on the robotino which your code can talk to. This daemon provides the connection to the Robotiono funcitonality.
      5. This is kind of a manual installation of the API files. If the automatic methods don't work for you.
      6. The easiest way is to have a look at the already provided examples. They show how to include the header files and how to use the functions of the robot.
      Hi misken,

      thank you so much for the help! Your explanation is very useful. I can partially grab the "visualization" of how the system works and the way to interact with each component now!
      I tried to blindly play around with it and there are another problems occur which I hope you can help me with:
      1. While installing cmake, it asked me to add something to system path, which I choose "no" since I have no idea what they are. Will it affect anything? (i.e build the solution file)
      2. Right now, while open the solution project generated by cmake with visual studio, a message popup and ask me something about "inconsistent line endings" - picture below. Should I choose Windows or another system type?
      3. The folder "kinect" of the API doesn't contain enough file for cmake to generate a solution file, is it an error or there is a reason behind this?!
      4. The online directory of robotino here provide a huge resource for me to play around with. However, I don't understand the structure of it/how it is divided into subfolder?! Can you explain it to me?

      Thanks!
      Attached Files
      Last edited by nhphuong; 07-01-2016, 10:11 AM.

      Comment


      • #4
        Originally posted by nhphuong View Post

        Hi misken,

        thank you so much for the help! Your explanation is very useful. I can partially grab the "visualization" of how the system works and the way to interact with each component now!
        I tried to blindly play around with it and there are another problems occur which I hope you can help me with:
        1. While installing cmake, it asked me to add something to system path, which I choose "no" since I have no idea what they are. Will it affect anything? (i.e build the solution file)
        2. Right now, while open the solution project generated by cmake with visual studio, a message popup and ask me something about "inconsistent line endings" - picture below. Should I choose Windows or another system type?
        3. The folder "kinect" of the API doesn't contain enough file for cmake to generate a solution file, is it an error or there is a reason behind this?!
        4. The online directory of robotino here provide a huge resource for me to play around with. However, I don't understand the structure of it/how it is divided into subfolder?! Can you explain it to me?

        Thanks!
        [ATTACH=CONFIG]temp_65_1467367275488_713[/ATTACH]
        So,
        1.: generally it should be better to have the system paths set like the installation routine asked for. So if you get errors regarding cmake, try to install it again an choose to add the system path stuff. It might be necessary for cmake to find files.
        2.: I think you can ignore this, just choose windows since it looks like you are working on a windows system.
        3.: I don't know how to deal with this, I never used it. Do you need the Kinect? Otherwise I would ignore this.
        4.: This is the repository of all source files, you can use SVN tools to check this out to your PC. I cannot tell anything about the general structure here, it is made by the developers. But most folders have meaningful names (normally in SVN, current versions of files are in the "trunk" folder, so have a look there first).

        Comment


        • #5
          Originally posted by misken View Post

          So,
          1.: generally it should be better to have the system paths set like the installation routine asked for. So if you get errors regarding cmake, try to install it again an choose to add the system path stuff. It might be necessary for cmake to find files.
          2.: I think you can ignore this, just choose windows since it looks like you are working on a windows system.
          3.: I don't know how to deal with this, I never used it. Do you need the Kinect? Otherwise I would ignore this.
          4.: This is the repository of all source files, you can use SVN tools to check this out to your PC. I cannot tell anything about the general structure here, it is made by the developers. But most folders have meaningful names (normally in SVN, current versions of files are in the "trunk" folder, so have a look there first).
          Alright, thanks for the suggestion!
          I'm thinking about develop an application for object recognition using Kinect. But that may be later!

          Comment


          • #6
            OK, I met another problem occur with the instruction for using API2 with Visual Studio and CMake here.
            Click image for larger version

Name:	Capture.JPG
Views:	85
Size:	23.5 KB
ID:	390

            According to the Solution explorer,
            Click image for larger version

Name:	Capture1.JPG
Views:	84
Size:	23.3 KB
ID:	391
            I saw that the ALL_BUILD solution is the active one! It's clearly that there is nothing in there so no program with the name "ALL_BUILD" can be built. =>> How can the one in the instruction on wiki can be run?!?!
            Therefore, I changed the active solution into "example_circle", but errors keep show up one after another!
            Click image for larger version

Name:	Capture2.JPG
Views:	83
Size:	19.9 KB
ID:	392Click image for larger version

Name:	Capture3.JPG
Views:	83
Size:	33.8 KB
ID:	393

            Comment


            • #7
              Sorry for the late reaction but I was on holidays. Unfortunately I cannot help you there since I'm no Windows programmer and don't know how to deal with Visual Studio.

              Comment


              • #8
                Originally posted by misken View Post
                Sorry for the late reaction but I was on holidays. Unfortunately I cannot help you there since I'm no Windows programmer and don't know how to deal with Visual Studio.
                Don't worry, it's fine. Thank you so much for the help!

                Comment

                Working...
                X