I'm working with a system using two UR5 arms being controlled via a pair of ur_modern drivers. I'm trying to implement a joystick button to engage teach mode on the arms, mostly because it's sometimes physically challenging in our setup to manipulate the teach-mode-d arms while holding down the Teach Pendant button.
The URscript API (http://www.sysaxes.com/manuels/scriptmanual_en_3.1.pdf) documents the 'teach_mode()' and 'end_teach_mode()' commands, and I've been trying to make the button work by publishing these commands to the URscript topic that ur_modern creates and listens to. I've had success using other URscript commands through that topic ('movej()', 'speedl()', and 'stop()' in particular), but I haven't been able to get the teach_mode() command to do anything at all.
I've read that there have historically been issues getting the Teach Pendant and ROS-I ur_driver to play well together around teach mode, because they constantly send conflicting messages - is the issue I'm having because the Teach Pendant is constantly telling the robot it's NOT in teach mode until the button on the pendant is depressed? Is there any other solution I might pursue to try to get this to work?
Thanks in advance!
EDIT 11/16/2016:
On gvdhoorn's advice below, looked into the Teach Pendant logs. The log seems to record most commands I send through the ur_modern URscript topic, but does not report anything for the teach_mode() command. Example log output:
// Enabled teach mode using the pendant, then released it:
URControl C100A1: Robot changed mode: TEACH
URControl C100A0: Robot changed mode: OK
// Used URscript topic to send movej(), speedl(), and stop() commands:
RTMachine Program stopl started
RTMachine Program stopl started
RTMachine Program movejstarted
RTMachine Program stopl started
RTMachine Program speedl started
RTMachine Program speedl started
RTMachine Program speedl started
RTMachine Program speedl started
// Sent teach_mode() commands via URscript topic --> no output on log
Sidenote - the api also lists both teach_mode() and freedrive_mode() commands, and I'm not clear on what the difference between these is... I've tried both though, to the same lack of effect.
Originally posted by conor.mcmahon on ROS Answers with karma: 73 on 2016-11-14
Post score: 0
Original comments
Comment by gvdhoorn on 2016-11-15:
The ur_modern_driver
should only upload the controller side of things whenever it needs to execute a trajectory. Can you try and see whether the log
tab on the pendant has any info on which programs are running at the time you send teach_mode()
?
Comment by gvdhoorn on 2016-11-15:
To test whether there is some clash with ur_modern_driver
, use something like ncat
to send the URScript command directly. ThomasTimm/ur_modern_driver#73 might also be related.