Sending command to move kuka lbr IIWA
I am trying to use the following ros communication interface to control kuka LBR IIWA. https://bitbucket.org/khansari/iiwa I tried to directly send commands to move robot accordingly using respective ros topic /iiwa/command. However it does not work. Can anybody please tell me the correct way.
Thank you
It would probably help if you could describe what "does not work", and what you do observe.
For example I tried with: rostopic echo /iiwa/command/jointAngles 0,0,0,0,0,0,0.2. It shows rostopic: error: you may only specify one input topic
That doesn't work because you're not using the correct syntax, not because
khansari/iiwa
is faulty.rostopic echo ..
would print incoming messages, it doesn't send something to the node. Please see therostopic
documentation. Look atrostopic pub
.I used as follow: rostopic pub -1 /iiwa/command/cartPosition iiwa/IIWAMsg -- '[600.5455465250951, 1.8979595305782153, 538.6429244423919]' ERROR: Not enough arguments: * Given: [[600.5455465250951, 1.8979595305782153, 538.6429244423919]] * Expected: ['isJointControl', 'cartPosition', 'cartForces',..
Is this is in correct syntax? Thank you
No, it's not. Try
rostopic pub -1 /iiwa/command/cartPosition <tab> <tab>
(where<tab>
is the key on your keyboard). That should give you a message template to fill in.Alternatively you could of course just write a simple (Python) node that publishes those messages.
I tried but didn't see any message template.
Are you sure that you have sourced the workspace where
khansari/iiwa
is built in? If not,rostopic
will not be able to auto-complete the message structure. Verify you have things setup correctly by doing arostopic info /iiwa/command/cartPosition
. It should show the correct msg type.