Communication Issue between Robotino and External PC througt the REST-API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Elena
    Junior Member
    • Feb 2024
    • 5

    #1

    Communication Issue between Robotino and External PC througt the REST-API

    Hello everyone!
    I'm experiencing a communication issue between my Robotino and my external PC while using ROS Noetic on Ubuntu 20.04. I've been testing some example scripts from the RobotinoWiki web, specifically bumper.py and omnidrive.py.

    When I run bumper.py, I can successfully retrieve bumper reading data, indicating that the communication between the Robotino and the PC is working. However, when I execute omnidrive.py and send velocity messages through the cmd_vel topic, the robot doesn't move at all.

    I've verified that velocity messages are being sent correctly, but it seems that the Robotino isn't responding to them as it should.

    I'm wondering if there's any additional configuration that needs to be enabled in the Robotino web interface to allow motion control through the REST-API.

    Has anyone experienced a similar issue or have any ideas what might be causing this behavior?

    Any help or suggestions would be greatly appreciated! Thank you in advance.

  • CDP
    Festo Employee
    • Jul 2016
    • 63

    #2
    Assuming that you are using Robotino 4 with an up2date image my suggestion is to test whether Robotino moves if you use the webinterface (which also uses REST).
    If it does not move this way you probably have to close the safety circuit on DI0.
    Beyond this it will be hard for us to help due to so many Software dependencies.
    We just released 4.20.10 on the wiki, so if you are running a later OS this could be a great time to upgrade Robotino.

    Good luck!

    Comment

    • Elena
      Junior Member
      • Feb 2024
      • 5

      #3
      Hi,

      I greatly appreciate your response. After following your instructions, I have confirmed that my Robotino 4 is functioning correctly through the webinterface with the latest available version, 4.20.10. However, the data transmission between the external computer and Robotino did not work.

      Upon further investigation, I have identified that the issue lies in the omnidrive.py script published on the wiki.

      Upon reviewing the code thoroughly, I noticed that on line 45, the data transmission is not performed correctly using a dictionary, but rather should be done with a list. I have amended the code according to this observation, and I am pleased to report that my Robotino now works perfectly with the corrected script.

      Please find attached the updated code that has resolved the issue. (In the following code, the line I have modify, differing from the script present in the wiki, is line 13).

      Click image for larger version

Name:	image.png
Views:	85
Size:	114.1 KB
ID:	13274​​​​​​

      Comment

      • verbeek
        Administrator
        • Mar 2015
        • 242

        #4
        Hi,
        line 13 is just the same as in


        but line 15 you are setting data= json.dump(pdata)
        this is different to the wiki and I updated the code in the wiki.

        What is line 45 you are reffering to?

        Comment

        • Elena
          Junior Member
          • Feb 2024
          • 5

          #5
          Hi,
          The reference to line 45 is actually from the omnidrive.py script found in both the robotino_rest_node and robotino_complete packages in the Robot Operating System (ROS) section of the documentation. You can find it in the following link: https://doc.openrobotino.org/ROS/

          Additionally, the line in question is: pdata = {'vx':data.linear.x, 'vy':data.linear.y, 'omega':data.angular.z}.

          Thank you for your attention.

          Comment

          Working...