Announcement

Collapse
No announcement yet.

Robotino 2 - C++ Programming from ground up

Collapse
X
 
  • 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
      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

        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

          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:	412
Size:	23.5 KB
ID:	390

            According to the Solution explorer,
            Click image for larger version

Name:	Capture1.JPG
Views:	470
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:	395
Size:	19.9 KB
ID:	392Click image for larger version

Name:	Capture3.JPG
Views:	428
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
                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


                • #9
                  Hi, I want to learn something robotino programming. I am very new for robotino and I have got old version. I try to use robotino 2. Its version is 1.6. I am sorry for my bad English I really need help.
                  1. I can't use odometry in Robotino wiev because of version is 1.6. I want to update robotino 2 firmware but ı don't now how. wiki is not usefull for me.
                  2. What is API? How can I download and use? I guess I need API for matlab or C++ for programming. Please help me.

                  Comment


                  • #10
                    Hi,

                    First you should upgrade the CF-card image to version 2.4

                    https://wiki.openrobotino.org/index.....29_DEPRECATED

                    and

                    Comment


                    • #11
                      Originally posted by Reyhanc
                      Hi, I want to learn something robotino programming. I am very new for robotino and I have got old version. I try to use robotino 2. Its version is 1.6. I am sorry for my bad English I really need help.
                      1. I can't use odometry in Robotino wiev because of version is 1.6. I want to update robotino 2 firmware but ı don't now how. wiki is not usefull for me.
                      2. What is API? How can I download and use? I guess I need API for matlab or C++ for programming. Please help me.
                      Hi, I suggest you try the following steps first:
                      1. Update the robot OS to latest version
                      2. If you wish to program it in C++ ->> Learn to use Linux (Ubuntu for ex.). Starting with it from Windows would make things EXTREMELY DIFFICULT!
                      3. Here is a list of something you should learn (or know what it is, how it works) before trying to understand what they said in wiki: Git/SVN, Linux basics commands, CMake (build a program using it), Visual studio code (for coding just like MS visual studio), ROS
                      About your questions:
                      1. Update its firmware is very easy, just like what you do with Raspberry Pi (if you know about embedded system); or create a usb boot. You only need to download the image file, use any flashing tools and flash that image to the CF card of the robot. Then plug the card back to the robot and turn it on -> Done!
                      2. "What is Robotino API", it could be roughly described as a set of tool built by Festo for developer to use in their program to interact with robot. The simplest example I could think of is a set of header files you can include at the beginning of your *.cpp file. Other than that, API sometimes can be called/run directly by command line in terminal (not sure if Robotino has it).

                      Have fun!
                      Last edited by nhphuong; 02-03-2020, 03:18 AM.

                      Comment

                      Working...
                      X
                      😀
                      🥰
                      🤢
                      😎
                      😡
                      👍
                      👎