Skip to content

TriKnight/unity_universal_robots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity and UR Digital Twin Application based on ROS

license - apache 2.0 License

This repository contains a collection of ROS packages and a Unity package, which shows the basic example of communication between Unity and a UR10e robot throughout the ROS connection. Please check the two demonstrations videos following:

Demo1: Unity control UR robot by publishing the joint position control signal
Unity control UR robot via ROS

Demo2: The UR robot publishes /joint_state topic to Unity UR robot pushlish the /joint_state toppic to Unity|

1.Installation

Show more Softwares and packages are using in this project
Name Version
Unity Hub 3.4.2
Unity 2021.3.18f1
Ubuntu 20.04
ROS Noetic

1.1 Install Universal Robot ROS driver

https://github.com/UniversalRobots/Universal_Robots_ROS_Driver

1.2 Following steps to setup the ROS_Unity_Integration

https://github.com/Unity-Technologies/Unity-Robotics-Hub/tree/main/tutorials/ros_unity_integration

1.3 Following Moveit Tutorial

https://ros-planning.github.io/moveit_tutorials/doc/move_group_python_interface/move_group_python_interface_tutorial.html

https://moveit.ros.org/documentation/concepts/

1.4 Gitclone and building unity_universal_robot ROS package

git clone https://github.com/TriKnight/unity_universal_robots
cd catkin_ws
catkin build

2.Running Gazebo simulation

Show more There are launch files available to bringup a simulated robot - either UR5e or UR10e. In the following the commands for the UR10e are given. For the UR5, simply replace the prefix accordingly.

2.1 To bring up the simulated robot in Gazebo, run:

roslaunch ur_gazebo ur10e_bringup.launch

2.2 MoveIt! with a simulated robot

Again, you can use MoveIt! to control the simulated robot.
For setting up the MoveIt! nodes to allow motion planning run:

roslaunch ur10e_moveit_config ur10e_moveit_planning_execution.launch sim:=true

2.3 For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:

roslaunch ur10e_moveit_config moveit_rviz.launch


3. Running MoveGroup example

Show more

3.1 Start RViz and MoveGroup node

Open two shells. Start RViz and wait for everything to finish loading in the first shell:

roslaunch ur10e_moveit_config demo.launch

3.2 Run the move_group_joint_state example This code will help the robot move by following joint state positions and desired points throughout ROS service

rosrun unity_universal_robots move_group_joint_state.py

4. Running Unity with UR10e robot

Show more

4.1. Running the ROS Driver, Robot_IP: <your_robot_IP>

roslaunch ur_robot_driver ur10e_bringup.launch robot_ip:=192.168.1.201 

4.2. Running MoveIt planning on UR10e robot

roslaunch ur10e_moveit_config ur10e_moveit_planning_execution.launch limited:=true 

4.3. Nextstep running the Moveit! config with RViz view

roslaunch ur10e_moveit_config moveit_rviz.launch

4.4. Start Unity and Open the UR_ROS_Unity package in folder

https://github.com/TriKnight/UR_ROS_Unity/

UR10e Robot in Unity

4.5. Running the TCP/IP end point server

Note, By default, the server_endpoint will listen on ip 0.0.0.0 (i.e. allowing all incoming addresses) and port 10000, but these settings are configurable. To override them, you can change the command to roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:=127.0.0.1 tcp_port:=10000 (obviously replacing 127.0.0.1 with your desired IP and 10000 with your desired port number.)

roslaunch unity_universal_robots start_tcp_ip.launch

4.6. Running the Joint State Position control

rosrun unity_universal_robots pos_joints_control.py

About

Unity Universal Robot Communication via ROS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published