Skip to content

Project Description

Arthur Gomes edited this page Jul 12, 2022 · 7 revisions

This page contains a detailed explanation of the project along with its different components and dependencies. The project can broadly be divided into a Unity Section and a ROS section. This explanation also assumes that the reader is familiar with ROS and has experience with simulation in gazebo.

Unity

The unity game engine is used to simulate the Omron mobile robot in a section of the Nokia Chennai factory. The Unity simulation has several key components required to integrate it with ROS.

  • ROS TCP connector: This is a unity package that has been added in the scene via the editor package manager. It forms one end of the tcp bridge for communication with the ROS side. Apart from the TCP connection, this package also contains C# classes for ROS messages and custom message generation functions. API defined by this package is used by the C# scripts to interact with all things ROS.

  • URDF importer: This is a unity package that has been added in the scene via the editor package manager. It enables a URDF file along with its meshes to be imported directly into the unity scene as a physics articulation.

  • C# scripts: These scripts have been attached to the Omron robot model in the unity simulation. Their general function is similar to the plugins used in gazebo. The scripts give the robot GameObject functionality. Some well written example scripts can be found here. The scripts currently in use enable:

    • TF Broadcasting: broadcasts TF2 messages describing the state of the Robot. The two global frames map and odom are situated by default at the centre of the unity world.
    • Odometry Publishing: Robot Odometry Data is published to /odom.
    • Clock Publishing: current sim time is published to /clock to sync with ROS nodes.
    • Lidar Data Publishing: Laser scan data is published to /laser_scan.
    • Velocity Control: The robots velocity is controlled with command input from /cmd_vel.

ROS

The ROS side consists of the ROS-tcp-endpoint, navstack nodes and RVIZ visualizer.

  • ROS_tcp_endpoint: This ROS package has been cloned from here. It sets up a TCP endpoint as a ROS node that handles topics and services between unity and ROS. The endpoint is set to operate over port 10000, on local IP 127.0.0.1. To change the IP address or port edit the endpoint.launch file. OR pass both IP and port as arguments with roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:="<address>" tcp_port:="<number>".
  • omron_ld60_description: This ROS package contains the Omron LD60 xacro file and is used to load robot description for RVIZ.
  • omron_ld60_navigation: This ROS package contains the launch files and parameters for the nav stack to be implemented.
  • Nav Stack Setup:
    • move_base: The move_base package provides the motion planner for the robot. move_base also maintains its own costmaps and can function without any mapping node if required.
      • Planners: The global planner used is the global_planner. The dwa_local_planner is the local planner.
      • Costmaps: The costmaps used by move_base are the local and global costmaps. Both are implementations of the costmap_2d package. Each costmap contains 3 layers: static, obstacles and inflation, of which static and obstacles layers require input sources.
        • static: is set to receive map updates from the SLAM node over the /map topic.
        • obstacles: is set to receive lidar data over the /laser_scan topic.
    • gmapping: The SLAM node is provided by the gmapping package, although the localization function is not utilized for the project. The gmapping node is solely used for map building. Map updates are published over /map.
    • explore_lite: The package used for frontier exploration is explore_lite. It Uses move_base's action server to move the robot to the next frontier. Frontiers are calculated from map updates provided by gmapping over /map.

rqt_graph

RQT graph of entire ROS network.

Omron robot model

The model used in the unity simulation is a modified version of the model from the Omron APAC Repository. The model has been modified to add castor wheels and lidar reference frames. The Lidar in simulation is located at the upper_laser reference frame. The driving wheels of the robot model are the right_wheel and left_wheel. There are 4 pivoting castor wheels.

Fig: Modified Robot Model

Fig: Robot TF Tree

Clone this wiki locally