Control Kuka manipulator with robonomics.

Video with an example of work can be found here:


Requirements

  • ROS melodic, Gazebo (installation instraction here)
  • Some extra packages
sudo apt-get install ros-melodic-gazebo-ros-control ros-melodic-effort-controllers ros-melodic-joint-state-controller
  • IPFS 0.4.22 (download from here and install)
tar -xvzf go-ipfs_v0.4.22_linux-386.tar.gz
cd go-ipfs/
sudo bash install.sh
ipfs init
  • ipfshttpclient
pip install ipfshttpclient
  • Robonomics node (binary file) (download latest release here)
  • IPFS browser extension (not necessary)

Installation

Install Kuka manipulator and control packages

cd catkin_wc/src/
git clone https://github.com/orsalmon/kuka_manipulator_gazebo
git clone https://github.com/LoSk-p/kuka_controller
cd ..
catkin_make

Running gazebo model

roslaunch manipulator_gazebo manipulator_empty_world.launch

In a new window

rosrun manipulator_gazebo move_arm_server

model


Running robonomics

Go to the folder with robonomics file ad create a local robonomics network:

./robonomics --dev --rpc-cors all

robonomics

Go to https://parachain.robonomics.network and switch to local node

local

Then go to Accounts and create KUKA and WORK accounts. Save account's addresses and keys, you will need them later

acc

accs


Running ipfs

Run ipfs daemon:

ipfs daemon

Running control package

In kuka_control package path you need to edit move_arm_client.py.

cd src/
nano move_arm_client.py

Change kuka_address, kuka_key and work_address to you addresses and key, then change robonomics_path to your path to file robonomics.

code

Now you can run control script:

python move_arm_client.py

control

Then in a new window send a transaction to make Kuka move:

echo "ON" | ./robonomics io write launch -r <KUKA_ADDRESS> -s <WORK_KEY>

Where <KUKA_ADDRESS> and <WORK_KEY> are address and key from your accounts:

transaction

In the window with kuka_control package you will see:

done

Then go Developer/Chain state on the Robonomics portal, select datalog in query and add KUKA datalog with button '+':

datalog

Now you can find Kuka's telemetry using this hash in IPFS Companion:

ipfs

telemetry