ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, the continuous movement I wanted, was achieved. There were some changes to be done in the code and it was accomplished

Well, the continuous movement I wanted, was achieved. There were some changes to be done in the code and it was accomplished

The Code that worked

if ((data.buttons[0]==1) and (data.axes[6]==1)):
        a += 1
        print 'a = %s' %a
        if (a%30 == 0):
            if ((data.buttons[0]==1) and (data.axes[6]==1)):
                j1 = j1+0.1
                if (j1 >= 3.1): 
                    group1_variable_values[0] = 3.1
                    print "Limit reached joint 1"
                    print "Value of Joint 1 is: 3.1"
                else:
                    print "changing joint 1"
                    print "Value of Joint 1 is: %s " %j1
                    print "plan complete"
                    group1_variable_values[0] = j1
                        group1.set_joint_value_target(group1_variable_values)
                        plan2 = group1.plan()
                        execute2= group1.execute(plan2)

Well, the continuous movement I wanted, was achieved. There were some changes to be done in the code and it was accomplished

The Code that worked

if ((data.buttons[0]==1) and (data.axes[6]==1)):
        a += 1
        print 'a = %s' %a
        if (a%30 == 0):
            if ((data.buttons[0]==1) and (data.axes[6]==1)):
                j1 = j1+0.1
                if (j1 >= 3.1): 
                    group1_variable_values[0] = 3.1
                    print "Limit reached joint 1"
                    print "Value of Joint 1 is: 3.1"
                else:
                    print "changing joint 1"
                    print "Value of Joint 1 is: %s " %j1
                    print "plan complete"
                    group1_variable_values[0] = j1
                     group1.set_joint_value_target(group1_variable_values)
                     plan2 = group1.plan()
                     execute2= group1.execute(plan2)