README.md 1.87 KB
Newer Older
Lab Computer's avatar
Lab Computer committed
1
# Twins Controller
Jayant Khatkar's avatar
Jayant Khatkar committed
2
3

Includes the following important components:
4
- connecting with single arm through ros
Lab Computer's avatar
Lab Computer committed
5
6
- calibration
- connecting with extruder through ros
7

8
9
10
11
### Dependencies
- Ubuntu 18
- ROS Melodic
- MoveIt for ROS Melodic
Lab Computer's avatar
Lab Computer committed
12
- Miniconda
13

14

15
### Installation
16
```bash
Lab Computer's avatar
Lab Computer committed
17
# get repo
Lab Computer's avatar
Lab Computer committed
18
git clone --recurse-submodules https://code.research.uts.edu.au/bigprint/twins-controller.git
Lab Computer's avatar
Lab Computer committed
19
cd twins-controller
20

Lab Computer's avatar
Lab Computer committed
21
22
23
# create conda env
conda create -n ros python=2.7
conda activate ros
24

Lab Computer's avatar
Lab Computer committed
25
26
# install depenedencies
sudo apt install ros-melodic-moveit python-rosdep
27
28
source /opt/ros/melodic/setup.zsh
rosdep install --from-path catkin_ws/src --ignore-src -y
Lab Computer's avatar
Lab Computer committed
29
30
31
pip install -r requirements.txt

# make catkin workspace
32
33
34
35
36
cd catkin_ws
catkin_make
cd ..
```

37
### Running on Hardware
38
```bash
Lab Computer's avatar
Lab Computer committed
39
40
41
# source catkin workspace in every shell
source ./catkin_ws/devel/setup.zsh

42
43
### Run the following 2 or 3 commands in separate tabs

44
# Connect to the UR5e and launch a controller service
45
roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=192.168.1.101 kinematics_config:=$(pwd)/calibrations/r1_cal.yaml
46
# NOTE: the IPs for our two arms are 192.168.1.101 and 192.168.1.103 - use r2_cal.yaml for second robot
47
48
49
50
51
52
53
54
55
56
57
```

On the UR tablet do the following steps:
1. Turn tablet on
2. Turn robot on - select bottom left "Power Off"
3. Turn robot on - click ON and then START
3. Run Program
4. Load Program
5. select 'External Controller.urp'
6. Play button (bottom centre-right) > Play from beginning

58

59
```bash
Lab Computer's avatar
Lab Computer committed
60
61
# Launch MoveIt around the controller service
roslaunch ur5_e_moveit_config ur5_e_moveit_planning_execution.launch
62
63
64

# Optional: Launch RViz to Visualise the arm
roslaunch ur5_e_moveit_config moveit_rviz.launch config:=true
65

66
# Run the main code
Lab Computer's avatar
Lab Computer committed
67
cd src
Jayant Khatkar's avatar
Jayant Khatkar committed
68
ipython -i main.py
69
```
70

71
### Running in Simulation
72
73
74

```bash
# Launch simulated ur5e with moveit and visualisation 
Lab Computer's avatar
Lab Computer committed
75
roslaunch ur5_e_moveit_config demo.launch
Jayant Khatkar's avatar
Jayant Khatkar committed
76

77
# Run the main code
78
cd src
Jayant Khatkar's avatar
Jayant Khatkar committed
79
80
ipython -i main.py
```