Problem with SetStopCondition




Problem with SetStopCondition

Postby ali.akbari » Thu 23. Oct 2014, 14:20

Hello,

I have a problem with the set_stop_condition and move_along_joint_path services. I want to move the robot to another configration when the stop_condition service generates error. So, I set the stop_condition service and call it one step before calling the move_along_joint_path service. in this case, when stop_condition generates error, I cannot move the robot again and access to the move_along_path service as well.

Could you please let me know whether I can call the move_along_joint_path service since the set_stop_condition service has an error message?

Regards,
ali.akbari
 
Posts: 5
Joined: Thu 23. Oct 2014, 13:58

by Advertising » Thu 23. Oct 2014, 14:20

Advertising
 

Re: Problem with SetStopCondition

Postby fschmidt » Thu 23. Oct 2014, 15:33

when the move_along_joint_path service stopped because of an stop condition, the stop conditions are still considered active. so you probably want to clear or set a new list of stop-conditions before calling move_along_joint_path again.

you said you received an error - was it really an error then please send us the error message. or does the complete simulator viewer turn red? or is it simply that the stop-condition was triggered?
fschmidt
 
Posts: 96
Joined: Fri 27. Jun 2014, 14:44

Re: Problem with SetStopCondition

Postby ali.akbari » Thu 23. Oct 2014, 16:34

In fact, I set manually set_stop_condition service to display this error message in order to test my program and it is not the error of the simulator.

Let me describe more details about my problem with an illustration. For instance, the robot is movinig by move_along_joint_path service and suddenly, it stops due to stop_condition. Afterwards, I am going to move the robot to the new configuration by applying set_servo_target since the response of stop_condition service is not the desired one. In this case, when servo_target is activated, the response of servo_taget says "On hold". I am not sure, but I think this is becuase the move_along_ joint_path service is not terminated when stop_condition stops robot motion.
ali.akbari
 
Posts: 5
Joined: Thu 23. Oct 2014, 13:58

Re: Problem with SetStopCondition

Postby fschmidt » Thu 23. Oct 2014, 17:31

ali.akbari wrote:...Afterwards, I am going to move the robot to the new configuration by applying set_servo_target ... the response of servo_taget says "On hold". ...


did you enable the servo mode by calling the enable_servo_mode service before calling the set_servo_target service? (as descibed in section 2.5.2.1 in the technical annex).

when the robot is not in servo-mode you will get an error message of "error, not in servo mode: XY" when you try to call set_servo_target.
fschmidt
 
Posts: 96
Joined: Fri 27. Jun 2014, 14:44

Re: Problem with SetStopCondition

Postby ali.akbari » Thu 23. Oct 2014, 17:41

Yes I did. First, I enabled it then I called it.
ali.akbari
 
Posts: 5
Joined: Thu 23. Oct 2014, 13:58

Re: Problem with SetStopCondition

Postby fschmidt » Thu 23. Oct 2014, 17:54

and what is the exact error message you get in return of set_servo_target()?

could you also please send a screenshot from the simservVM (3d-viewer plus terminal) to the challenge support mailing list: support-challenge02@robotics-challenges.eu
fschmidt
 
Posts: 96
Joined: Fri 27. Jun 2014, 14:44

Re: Problem with SetStopCondition

Postby ali.akbari » Fri 24. Oct 2014, 09:36

There was something missing in the code. It has been solved now by including new list . Thanks
ali.akbari
 
Posts: 5
Joined: Thu 23. Oct 2014, 13:58

Re: Problem with SetStopCondition

Postby kaust » Mon 27. Oct 2014, 11:37

fschmidt wrote:when the move_along_joint_path service stopped because of an stop condition, the stop conditions are still considered active. so you probably want to clear or set a new list of stop-conditions before calling move_along_joint_path again.


How can an already set stop condition be cleared when the robot stops due to it?
kaust
 
Posts: 6
Joined: Thu 16. Oct 2014, 10:53

Re: Problem with SetStopCondition

Postby fschmidt » Mon 27. Oct 2014, 14:16

kaust wrote:How can an already set stop condition be cleared when the robot stops due to it?


the simulator holds a set of stop conditions. this set is initially empty. the user can specify a new set of stop conditions by calling the set_stop_conditions service.

when the robot is executing a move_along_joint_path at every simulation timestep, each condition is checked - if one condition is met (i.e. measured est. torque of 2nd lwr joint is above 30Nm) then the movement is stopped and the cause of the stop is returned in the stop_reason field of the move_along_joint_path service call.

if you want to clear the set of stop conditions simlpy call the set_stop_conditions service with an empty conditions-field.

example:
1. set the set of stop conditions to hold only a single stop condition which triggers as soon as the 2nd joint of the LWR measures an external torque higher than +30 Nm:
Code: Select all
    system.set_stop_conditions([
        StopCondition(
            condition_type='joint_ext_torque_threshold',
            joint_name='lwr_joint_2',
            condition_operator='>',
            threshold=30.0
            )
    ])

2. now move the lwr into a direction which will cause the stop condition to trigger because of a collision e.g. with the table
Code: Select all
    # assume the lwr is at it's 0,0,0,0,0,0,0 position
    stop_reason = system.move([Configuration(q=[110])], ['lwr_joint_2'], lwr_acc=100)
    print 'Move finished, stop reason: ' + stop_reason

this will stop the lwr at ~106[deg] and will print that the movement was stopped because "stop_condition 0: joint 1 ext_torque 30.1747 > 30.0000 at sim_time ..." (sadly in this output the joint's are zero-indexed.)
3. to be able to move the lwr out of this collision you first need to remove this stop-condition. otherwise it will immediately trigger again on the next move_along_joint_path call. here we simply set an empty set of stop conditions, and then command the robot back to it's 0-position:
Code: Select all
    system.set_stop_conditions([])
    stop_reason = system.move([Configuration(q=[0])], ['lwr_joint_2'], lwr_acc=100)
    print 'Move finished, stop reason: ' + stop_reason

which should move the lwr and then print the stop reason as "path finished".
fschmidt
 
Posts: 96
Joined: Fri 27. Jun 2014, 14:44

Re: Problem with SetStopCondition

Postby ali.akbari » Thu 6. Nov 2014, 08:11

Hello,
I want to ask you whether it is possible to set stopcondition for axis_x and axis_y?
ali.akbari
 
Posts: 5
Joined: Thu 23. Oct 2014, 13:58

Next

TAGS

Return to Stage 1 - Simulation

Who is online

No registered users

cron