Robotics StackExchange | Archived questions

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

Asked by Ahyan on 2016-04-09 06:42:12 UTC

Comments

However it does not work.

It would probably help if you could describe what "does not work", and what you do observe.

Asked by gvdhoorn on 2016-04-09 07:45:23 UTC

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

Asked by Ahyan on 2016-04-09 08:14:55 UTC

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 the rostopic documentation. Look at rostopic pub.

Asked by gvdhoorn on 2016-04-09 08:35:40 UTC

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',..

Asked by Ahyan on 2016-04-14 04:29:23 UTC

Is this is in correct syntax? Thank you

Asked by Ahyan on 2016-04-14 04:31:09 UTC

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.

Asked by gvdhoorn on 2016-04-14 05:22:50 UTC

I tried but didn't see any message template.

Asked by Ahyan on 2016-04-14 22:26:17 UTC

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 a rostopic info /iiwa/command/cartPosition. It should show the correct msg type.

Asked by gvdhoorn on 2016-04-15 01:27:41 UTC

rostopic info /iiwa/command/cartPosition shows Unknown topic /iiwa/state/cartPosition. Actually there are only /iiwa/command and /iiwa/state topics if I use rostopic list. However rostopic echo /iiwa/state/cartPosition works. Although rostopic info /iiwa/state/cartPosition also shows same errors.

Asked by Ahyan on 2016-04-15 02:59:25 UTC

Ok, so cartPosition is a sub field of command? In that case you should do rostopic pub /iiwa/command <tab> <tab>. It should then auto-complete the msg.

If you haven't already, I'd really recommend doing some of the ROS tutorials that deal with msgs. To get a feel for it/them.

Asked by gvdhoorn on 2016-04-15 09:54:11 UTC

Answers