Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.66 KB

README.md

File metadata and controls

41 lines (33 loc) · 1.66 KB

SimpleUnityROSSimulation

Creating a simple Unity project to interface with ROS1 (and possibly ROS2). This is currently a work in progress as I figure out what I want to do. More details will be added later on.

Development Environment

  • OS: Ubuntu 20.04
  • Unity version: Unity 2020.3.10f1
  • ROS version: ROS Noetic

Cloning the repo

This repository has sub-modules so you will need to run: git clone --recurse-submodules -j8 git@github.com:sarika93/SimpleUnityROSSimulation.git

ROS Setup

  1. Navigate to the ROS1 folder in this repository, which is a ROS workspace: cd ROS1/.
  2. Run catkin_make here.

Instructions for use

ROS

  1. In your terminal ensure ROS is sourced properly:
source /opt/ros/<distro>/setup.bash
  1. Your ROS workspace with the ros_tcp_endpoint package should also be sourced:
source ~/path/to/ROS1/devel/setup.sh
  1. From any folder run the launch file:
roslaunch unity_ros_demo test.launch

This launches the endpoint and robot_state_publisher nodes, as well as rviz.

Unity

  1. Open the SimpleROSArm project in Unity.
  2. Open the Assets/Scenes/SampleScene scene. This scene has a robot that is able to publish its joint state.
  3. In the Editor, select the ur5e prefab. In the RobotController component, you can set the robot's joint goals. The joint state should be updated in RViz.

External Resources