ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

Repository Summary

Checkout URI https://github.com/hijimasa/ros2-tools-to-use-unity-like-gazebo.git
VCS Type git
VCS Version main
Last Updated 2024-12-04
Dev Status UNMAINTAINED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

README

ros2-tools-to-use-unity-like-gazebo

English | 日本語 demo

camera_demo

This repository shows how to control the robot from ros2_control to make Unity easier to use. “unity_ros2_scripts” has the python script to launch and control Unity.

The features of this repository are below:

  • This shows how to control a robot on Unity with ros2_control.
  • This provides a Dockerfile where Unity and ROS2 Humble can coexist.
  • This currently supports prismatic and rotational joints using position and velocity control.
  • This sends joint status (position, velocity and effort) to ros2_control from Unity.
  • This spawns URDF model at the desired timing and position.
  • This sets stiffness, damping and friction from URDF description.

Prerequisite

  1. Docker
  2. Unity account

Prepare Docker container

  1. Clone this repository
   git clone https://github.com/hijimasa/ros2-tools-to-use-unity-like-gazebo.git
   
  1. Initialize Git submodule
   cd ros2-tools-to-use-unity-like-gazebo/
   git submodule update --init --recursive
   
  1. Move to docker directory
   cd docker
   
  1. Build docker image
   ./build-dokcer-image.bash
   
  1. Run docker container
   ./run-docker-container.bash
   
  1. Run UnityHub
   unityhub
   
  1. Sign in Unity

How to Use

Tips: Use below command to launch another docker terminal

docker exec -it ros-humble-unity /bin/bash

  1. launch Unity.
   ros2 run unity_ros2_scripts launcher
   
  1. Import URDF.
   ros2 launch unity_diffbot_sim diffbot_spawn.launch.py
   
  1. launch ros_tcp_endpoint
   ros2 run ros_tcp_endpoint default_server_endpoint --ros-args -p ROS_IP:=0.0.0.0
   
  1. Add “3D Object Plane” to use ground plane.

  2. Run Simulation

  3. launch teleop_twist_keyboard

   ros2 run teleop_twist_keyboard teleop_twist_keyboard
   

CONTRIBUTING

No CONTRIBUTING.md found.

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository

ros2-tools-to-use-unity-like-gazebo repository