# Twins Controller Includes the following important components: - connecting with single arm through ros - calibration - connecting with extruder through ros ### Dependencies - Ubuntu 18 - ROS Melodic - MoveIt for ROS Melodic - Miniconda ### Installation ```bash # get repo git clone --recurse-submodules https://code.research.uts.edu.au/bigprint/twins-controller.git cd twins-controller # create conda env conda create -n ros python=2.7 conda activate ros # install depenedencies sudo apt install ros-melodic-moveit python-rosdep source /opt/ros/melodic/setup.zsh rosdep install --from-path catkin_ws/src --ignore-src -y pip install -r requirements.txt # make catkin workspace cd catkin_ws catkin_make cd .. ``` ### Running on Hardware ```bash # source catkin workspace in every shell source ./catkin_ws/devel/setup.zsh ### Run the following 2 or 3 commands in separate tabs # Connect to the UR5e and launch a controller service roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=192.168.1.101 kinematics_config:=$(pwd)/calibrations/r1_cal.yaml # NOTE: the IPs for our two arms are 192.168.1.101 and 192.168.1.103 - use r2_cal.yaml for second robot ``` 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 ```bash # Launch MoveIt around the controller service roslaunch ur5_e_moveit_config ur5_e_moveit_planning_execution.launch # Optional: Launch RViz to Visualise the arm roslaunch ur5_e_moveit_config moveit_rviz.launch config:=true # Run the main code cd src ipython -i main.py ``` ### Running in Simulation ```bash # Launch simulated ur5e with moveit and visualisation roslaunch ur5_e_moveit_config demo.launch # Run the main code cd src ipython -i main.py ```