Skip to content

Fetch robot inverse kinematics with relaxed IK. Similar to moveit

Notifications You must be signed in to change notification settings

bryceikeda/FetchRelaxedIKHoloLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FetchRelaxedIKHoloLens2

This is a Unity project I created to show how you can control a robot arm in Unity using inverse kinematics calculations from ROS. Specifically, I use relaxedIK to compute the joint positions given an end-effector position, and send that to an AR visualization on the HoloLens 2.

Note: If you compile relaxedIK using windows, it will output a dll that you can use in Unity rather than sending and receiving information using ROS. The performance is much better. However, I was unable compile the repository. It should work with most other robots that they already compiled/built it for in their Unity repository. Setup will probably be slightly different.

fetch_gif

Requirements

Setup

RelaxedIK

Create a new ROS workspace folder.

mkdir relaxed_ik
cd relaxed_ik/

Clone the following repositories into a src directory

git clone --recuse-submodules https://github.com/uwgraphics/relaxed_ik_ros1.git src 
cd src
git clone https://github.com/Unity-Technologies/ROS-TCP-Endpoint.git

If in WSL2 install rust like so:

sudo apt-get update
sudo apt-get install curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

If in Ubuntu install rust like so:

sudo apt-get update
sudo apt-get install curl
curl https://sh.rustup.rs -sSf | bash -s -- -y
source $HOME/.cargo/env
echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

Build relaxed_ik_core:

cd relaxed_ik_ros1/relaxed_ik_core/
cargo build

Use fetch.yaml settings:

cp configs/example_settings/fetch.yaml configs/settings.yaml

Build the directory

cd ..
catkin build

Source the directory

source devel/setup.bash

Unity

  • Open up the Unity project
  • Open up the FetchRelaxedIKScene
  • Open up the FetchRelaxedIKScene
  • Update your IP address in the Robotics tab
  • Enable holographic remoting for play mode under the Mixed Reality tab, adding the IP address of your Hololens holographic play mode app

Running the Application

ROS

Launch the Relaxed IK solver by typing the following command:

roslaunch relaxed_ik_ros1 demo.launch

Launch the ros_tcp_endpoint by typing the following command adding in your own IP address:

roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:=127.0.0.1 

Unity

  • Press play on the Unity application
  • Grab the Fetch robot's end effector and move it around.

About

Fetch robot inverse kinematics with relaxed IK. Similar to moveit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages