Comau

Supporto

Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur.


Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur.

e.DO People Learn Robotics Forums Software Text-based programming in e.DO-app

This topic contains 11 replies, has 3 voices, and was last updated by  Comau 2 weeks, 1 day ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #6539

    Jens Rohleder
    Participant

    Dear Comau
    I am currently developing teaching materials for the e.DO robot.
    The exercises are aimed at students in secondary school/high school. I have been working with the e.DO app on Windows – which means exercises with Waypoints and Blockly. I estimate that the next step will be to move from block-based to text-based programming. Is it possible to do this without the transition getting too harsh. Can you recommend an optimal workflow?
    When I work with Blockly can I see the generated code, but I can not edit or write it. Is there any future plans is to make it possible to work with text-based programming in the e.DO-app?

    Thanks in advance
    Jens Rohleder

    #6783

    Comau
    Keymaster

    Dear Jens,

    there is not a text-based development environment untill now, it is an open point for the future.
    What do you want to teach to your guys? 🙂

    There are a lot of program languages that you could try to teach now with e.DO:
    1) Python : you can write a program in Python with some movements, transfer this program on the Raspberry, make this executable and then run it.
    2) C,C++ : e.DO is ROS compliant, it means that if you want to create a program in the ROS development environment, you could publish the messages on the related topic.
    3) Javascript : you can create a program on the browser or on the App in Javascript that send the messages on the topic.

    All these program languages could be created in order to move e.DO in joint space or in cartesian space.
    If you want some other informations write us again. 😉

    #6857

    Jens Rohleder
    Participant

    Dear Comau
    Thanks for the answer.
    I would very much like to write a program in Python with some movements and get it to run on the e.DO, but I am not sure exactly how.

    Which commands do I have to use to make e.DO move?
    Could you please point me to documentation and/or examples.
    How much do I have to know about ROS to do this?

    It is important that the learning curve doesn’t get too steep, so I am just talking about a few simple movements, but something that gives you an idea, so you can dig deeper if you want.

    Thanks in advance
    Jens Rohleder

    #6884

    Comau
    Keymaster

    Hi Jens,

    the learning curve becomes steeper according to the difficulty of your application, but do not worry because to move e.DO you could import a few ROS libraries in Python and write the correct movement message in the proper topic.

    I write here a simple example, if you want to run this code on e.DO, you have to transfer the code and make the file executable on Raspberry, then you have to initialize e.DO with the App simply by starting the App on the Tablet, release the brakes and run the code.

    
    #!/usr/bin/env python
    
    import socket
    import time
    import os
    import rospy
    
    PACKAGE='edo_core_pkg'
    import roslib
    roslib.load_manifest(PACKAGE)
    
    #from dynamic_reconfigure.server import Server as DynamicReconfigureServer
    
    import std_msgs.msg
    
    from edo_core_msgs.msg import JointControl
    from edo_core_msgs.msg import MovementCommand
    from edo_core_msgs.msg import JointControlArray
    from edo_core_msgs.msg import MovementFeedback
    from edo_core_msgs.msg import CartesianPose
    from edo_core_msgs.msg import Point
    from edo_core_msgs.msg import Frame
    
    from edo_core_msgs.srv import ControlSwitch
    
    from parse import parse
    
    algo_jnt_ctrl = rospy.Publisher('algo_jnt_ctrl', JointControlArray, queue_size=1)
    machine_move = rospy.Publisher('machine_move', MovementCommand, queue_size=1)
    
    waitme = 0
    def callback_algo_movement_ack(ack):
        global waitme
    
        print("callback algo movement ack")
        if ack.type == 2:
            waitme = 1
    
    rospy.init_node('test', anonymous=True)
    rate = rospy.Rate(100) # 100hz
    
    algo_movement_ack = rospy.Subscriber('algo_movement_ack', MovementFeedback, callback_algo_movement_ack)
    
    if __name__ == '__main__':
        print("Python Test")
        joints_via = [
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            float(5),
            ]
        joints = [
            float(90),
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            float(5),
            ]
             
        ros_cartesian_pose = CartesianPose(0.0,0.0,0.0,0.0,0.0,0.0,'')
        ros_point =  Point(74, ros_cartesian_pose, 127, joints)
        ros_via   =  Point(0,ros_cartesian_pose,0,joints_via)
        ros_frame =  Frame(0.0,0.0,0.0,0.0,0.0,0.0)
    
        mmmsg = MovementCommand(77, 74, 100, 0, 0, 0.0, ros_point, ros_via, ros_frame, ros_frame)
        machine_move.publish(mmmsg)
     
        print("Point1")
        rospy.sleep(3)
    
        joints = [
                float(0),
                float(0),
                float(0),
                float(0),
                float(0),
                float(0),
                float(5),
                ]
             
        ros_cartesian_pose = CartesianPose(0.0,0.0,0.0,0.0,0.0,0.0,'')
        ros_point =  Point(74, ros_cartesian_pose, 127, joints)
        ros_via   =  Point(0,ros_cartesian_pose,0,joints_via)
        ros_frame =  Frame(0.0,0.0,0.0,0.0,0.0,0.0)
    
        mmmsg = MovementCommand(77, 74, 100, 0, 0, 0.0, ros_point, ros_via, ros_frame, ros_frame)
        machine_move.publish(mmmsg) 
        print("Point2")	
    
            # publish move
      #      machine_move.publish(mmmsg)
    

    Best Regards,
    I wish you a wonderful year. 🙂

    • This reply was modified 2 months, 1 week ago by  Comau.
    • This reply was modified 2 months, 1 week ago by  Comau.
    #6889

    Jens Rohleder
    Participant

    Dear Comau
    Thanks for the code-example.I put it in a file and transferred it to the edo-folder on the Raspberry Py.
    I made it executable with chmod +x.
    When i run the code, I get the following message:
    The rosdep view is empty: call ‘sudo rosdep init’ and ‘rosdep update’

    eDO is not moving, but I can see some of the code is running because I get the print-statements, – except for the print statement in the Call-back.
    What can I do?

    Best regards, Jens

    #6896

    Comau
    Keymaster

    Hi Jens,
    there were some comments that created that problem. I removed the comments on the previous code in a few lines and now everything works. 😉

    #7039

    Jens Rohleder
    Participant

    Dear Comau
    Thanks for the code example. Now I can move the robot by changing the values in the joints-list.
    But how can I move the robot i the cartesian coordinate system? When I change the values in CartesianPose() or Frame() nothing happens.

    Best regards, Jens

    #7079

    Comau
    Keymaster

    Dear Jens,
    you can run this example in order to move in a cartesian space, you can find the fields of the ROS messages inside the code. I write here a simple example:

    
    #!/usr/bin/env python
    
    import socket
    import time
    import os
    import rospy
    
    PACKAGE='edo_core_pkg'
    import roslib
    roslib.load_manifest(PACKAGE)
    
    #from dynamic_reconfigure.server import Server as DynamicReconfigureServer
    
    import std_msgs.msg
    
    from edo_core_msgs.msg import JointControl
    from edo_core_msgs.msg import MovementCommand
    from edo_core_msgs.msg import JointControlArray
    from edo_core_msgs.msg import MovementFeedback
    from edo_core_msgs.msg import CartesianPose
    from edo_core_msgs.msg import Point
    from edo_core_msgs.msg import Frame
    
    from edo_core_msgs.srv import ControlSwitch
    
    from parse import parse
    
    algo_jnt_ctrl = rospy.Publisher('algo_jnt_ctrl', JointControlArray, queue_size=1)
    machine_move = rospy.Publisher('machine_move', MovementCommand, queue_size=1)
    
    waitme = 0
    def callback_algo_movement_ack(ack):
        global waitme
    
        print("callback algo movement ack")
        if ack.type == 2:
            waitme = 1
    
    rospy.init_node('test', anonymous=True)
    rate = rospy.Rate(100) # 100hz
    
    algo_movement_ack = rospy.Subscriber('algo_movement_ack', MovementFeedback, callback_algo_movement_ack)
    
    if __name__ == '__main__':
        print("Python Test")
        joints_via = [
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            ]
             
        joints = [
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            float(0),
            ]
        
    
        ros_cartesian_pose = CartesianPose(415.0,-120.0,310.0,0.0,180.0,0.0,'') 
        ros_cartesian_via = CartesianPose(0.0,0.0,0.0,0.0,0.0,0.0,'')
        ros_point = Point(80,ros_cartesian_pose,63, joints) 
        ros_via   = Point(0,ros_cartesian_via,0,joints_via)
        ros_frame = Frame(0.0,0.0,0.0,0.0,0.0,0.0)
        ros_tool  = Frame(0.0,0.0,0.0,0.0,0.0,0.0)
           
        mmmsg = MovementCommand(77, 76, 100, 0, 0, 0.0, ros_point, ros_via, ros_tool, ros_frame)
        machine_move.publish(mmmsg)
        
        rospy.sleep(3)
        
        ros_cartesian_pose = CartesianPose(415.0,-120.0,340.0,0.0,180.0,0.0,'') 
        ros_cartesian_via = CartesianPose(0.0,0.0,0.0,0.0,0.0,0.0,'')
        ros_point = Point(80,ros_cartesian_pose,63, joints) 
        ros_via   = Point(0,ros_cartesian_via,0,joints_via)
        ros_frame = Frame(0.0,0.0,0.0,0.0,0.0,0.0)
        ros_tool  = Frame(0.0,0.0,0.0,0.0,0.0,0.0)
           
        mmmsg = MovementCommand(77, 76, 100, 0, 0, 0.0, ros_point, ros_via, ros_tool, ros_frame)
        machine_move.publish(mmmsg)
        
        print("Point2")
    

    Best regards! 🙂

    #7172

    luca bergamaschi
    Participant

    Good morning,
    we had a brief demonstration at school for E.do (thanks to the Dalmine Foundation).

    Now I’m using the VM by E.do to the boys. For now I can only use VirtualMachine.

    I can interface with python, use Rviz in VM. For example with “roslaunch edo_sim display.launch”, after having eliminated the gui from launch, I can give commands to the joint_1, ..,Joint_ 6 in python.

    When I move to RViz MoveIt (roslaunch edo_moveit demo.launch), I can plan path and I can execute it in RViz.

    I can not, however, run your examples here the forum.

    I installed ros_core_pkg from github.

    Can you please give me help to try in VM these examples ?

    I joined the Comau Cloud. Where can I find documentation to program in python E.do?

    Thank you

    #7190

    Comau
    Keymaster

    Dear Luca,
    What kind of VM is it? Where did you find the VM?
    These examples are suitable for the real e.DO, We could try to help you if the VM is our product.

    We have no written documentation on that side untill now. We know that these examples are only Demo, but To program e.DO you can write these simple examples and manage them as you prefer, copy them inside the Raspberry and try to move the robot in whatever position you want.

    #7193

    luca bergamaschi
    Participant

    Good morning,
    I’m surprised because VM is yours: https://edo.cloud/virtual-edo/

    For now, my school does not buy anything. Because I wanted to introduce ROS, instead of using the Indigo VM available online as I have always done (with ROS-Serial and the Arduino Braccio), this year I want to use your VM of e.DO so, if it were to buy an arm, I can bring a project already underway to my school principal and, therefore, I can have some chances to buy a couple of e.DO.

    I can basically use the MoveIT tutorial with e.DO Urdf (as I can do) but I was more happy, as a teacher, if I could use your fake_controller and use your real examples (eORL.h allowing because it’s missing in your VM).

    So at the end, is there the possibility to configure your fake_controller with your VM to use the real examples in RViz or Gazebo ?

    Thank you
    Luca, italy middle school teacher

    #7205

    Comau
    Keymaster

    Dear Luca,
    Our question about the type of VM is due to the multiplicity of virtual machines related to e.DO compared to the activity that our teachers, with our experience e.DO in the learning center, want to do.

    The Virtual Machine you use is an example of an application with a Virtual e.DO, it is a development of our external collaborator that is shared with the community to demonstrate our interest in community proactivity, we greatly appreciate any kind of development on e.DO. We consider the best applications that can be implemented for the future.

    However until now we do not insert the real e.DO kinematics because we want to distinguish the development on the virtual machine and the e.DO. product.

    If you want some customized applications with the Virtual Machine in order to buy e.DO in a future, write us on the Support web page.

    If you have more questions do not hesitate to contact us! 🙂

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.