Sending command to move kuka lbr IIWA

asked 2016-04-09 06:42:12 -0600

Ahyan gravatar image

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

edit retag flag offensive close merge delete

Comments

However it does not work.

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

gvdhoorn gravatar image gvdhoorn  ( 2016-04-09 07:45:23 -0600 )edit

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

Ahyan gravatar image Ahyan  ( 2016-04-09 08:14:55 -0600 )edit

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

gvdhoorn gravatar image gvdhoorn  ( 2016-04-09 08:35:40 -0600 )edit

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

Ahyan gravatar image Ahyan  ( 2016-04-14 04:29:23 -0600 )edit

Is this is in correct syntax? Thank you

Ahyan gravatar image Ahyan  ( 2016-04-14 04:31:09 -0600 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2016-04-14 05:22:50 -0600 )edit

I tried but didn't see any message template.

Ahyan gravatar image Ahyan  ( 2016-04-14 22:26:17 -0600 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2016-04-15 01:27:41 -0600 )edit