Giter Site home page Giter Site logo

How it works? about onrobot HOT 2 CLOSED

ryanpaulmckenna avatar ryanpaulmckenna commented on August 29, 2024
How it works?

from onrobot.

Comments (2)

ViHin13 avatar ViHin13 commented on August 29, 2024 1

Look at the file /onRobot/xml_rpc_on_robot/list_methods_response.xml.
There you find all xmlrpc commands for RG grippers.
Look at line 33 (in my file at least). Here you find the command rg_get_busy.
Now check the response and request variables:

  1. go to /onRobot/xml_rpc_on_robot/
  2. open the file xml_request_sys_method_help.xml and change the value to rg_get_busy.
    <value><string>rg_get_busy</string></value>
  3. now navigate with your terminal to the folder /onRobot/xml_rpc_on_robot/
  4. and use this command curl -X POST -d @xml_request_sys_method_help.xml 192.168.1.101:41414. Change 192.168.1.101 to your robot ip
  5. i dont have a rg gripper. I show you the output for the 2fg7 gripper instead:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param><value><array><data>                 #ignore
<value><array><data>                      #ignore
<value><string>boolean</string></value>     #This is the response type (boolean) you get back with the value
<value><string>int</string></value>        #Now follows the request part. We have to send only one variable which should be int type 
</data></array></value>                 #ignore
</data></array></value></param>           #ignore
</params>
</methodResponse>
  1. so now you know your request and response types. In the gripper.py you can just copy the get_rg_width() function.
  2. change functionname between the tags
<methodCall>
    <methodName>rg_get_busy</methodName>
        <params>
            <param>
                <value><int>{self.rg_id}</int></value>
            </param>
        </params>
</methodCall>
  1. change rg_width = float(xml_response[0][0]) to rg_busy = bool(xml_response[0][0])
  2. call the function with your robot_ip and tool_id (usually 0)

from onrobot.

kimanton avatar kimanton commented on August 29, 2024

@ViHin13 Thank you for this explanation, I think now I know enough to implement corresponding methods

from onrobot.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.