Neobotix Simulation in Gazebo for Factories Intralogistics Task
- Ubuntu 24.04
- ROS2 Jazzy
- Gazebo Sim
To run this simulation, make sure your system is running Ubuntu 24.04. Also ensure that ROS 2 Jazzy, Gazebo Sim, and the related packages are already installed.
Open a new terminal and source the ROS 2 environment:
source /opt/ros/jazzy/setup.bashCreate a ROS 2 workspace, create a src folder, and navigate into it:
mkdir -p ~/jazzy_ws/src
cd ~/jazzy_ws/srcClone the repository:
git clone https://github.com/autonomymobilitylab/NeobotixSimulation.gitAfter cloning the repository, return to the workspace root and build all packages:
cd ~/jazzy_ws
colcon buildAfter successfully building the packages, the workspace should contain the build, install, log, and src folders.
Source the workspace:
source install/setup.bashSet the Gazebo IP address to the local IP:
export GZ_IP=127.0.0.1Launch the gazebo simulation using the following command:
ros2 launch rox_bringup bringup_sim_launch_1.pyThis will launch the simulation in the Gazebo Sim, you would see a robot and a trolley in the simulation environment.
Open a new terminal and detach the trolley from the robot using the following command before doing anything else:
ros2 topic pub --once /grip/detach std_msgs/msg/Empty "{}"When the simulation is launched using the launch command mentioned above, another terminal opens along with the simulation for teleoperation. To teleoperate the robot using this terminal, click on the terminal window and use the keys mentioned on the terminal for the teleoperation of the robot in the simulation.
This launch file is located in the following path and responsible for launcging the simulation world, robot model and trolley in that simulation.
rox>rox_bringup>launch>bringup_sim_launch_1.pyThe location and the orientation of the trolley and the robot can be changed by editing this launch file. To change the location of the trolley in the environment, open the bringup_sim_launch file of that environment and look for the following piece of code:
spawn_trolley = Node(
package='ros_gz_sim',
executable='create',
output='screen',
arguments=[
'-file', trolley_sdf,
'-name', 'trolley',
'-x', '10',
'-y', '-13',
'-z', '0.047',
'-R', '0',
'-P', '0',
'-Y', '0',
],
)
The location of the trolley can be chaneged by changing the x, y and z components and for varying the orientation of the trolley change the 'Y' component.
To change the location and orientation of robot in the environment, look for the following piece of code in the same file.
spawn_robot = Node(
package='ros_gz_sim',
executable='create',
name='spawn_model',
output='screen',
arguments=[
'-topic', 'robot_description',
'-name', 'rox'
'-x', '0',
'-y', '0',
'-z', '0',
'-R', '0',
'-P', '0',
'-Y', '0',
]
)
The location and orientation can be varied by changing these parameters as per requirement.
There are three simulation environments in this project and these environments can be launched by separate launch command as follows: For Environment 1:
ros2 launch rox_bringup bringup_sim_launch_1.pyFor Environment 2:
ros2 launch rox_bringup bringup_sim_launch_2.pyFor Environment 3:
ros2 launch rox_bringup bringup_sim_launch_3.pyThese launch files are all located in the location mentioned earlier and can be edited for different location and orientation of robot and trolley as specified earlier.
For autonomous navigation of the robot in the environment, launch the RViz using the command in a new terminal.
ros2 launch rox_navigation navigation.launch_1.pyThis will open the RViz with the map of the simulation environment.
Similar to the simulation launch file, the RViz launch file for each indiviual environment can be launched by using the following commands: For Environment 1:
ros2 launch rox_navigation navigation.launch_1.pyFor Environment 2:
ros2 launch rox_navigation navigation.launch_2.pyFor Environment 3:
ros2 launch rox_navigation navigation.launch_3.pyNow to launch the node for autonomous navigation of robot with the trolley, open a new terminal and use the following command.
ros2 run rox_navigation trolley_docking.pyOn launching this node, the robot would automatically find the trolley in the environment, would navigate to that location, perform docking and then would perform final transport along with the trolley.
The working of the node in different environments can be seen in the following animations:
This node for the trolley detection, docking and combined motion is located in the following path:
rox>rox_navigation>scripts>trolley_docking.pyIn the same folder, another node trolley_pose_noise_node is located which is responsible for providing the noisy location of the trolley in the simulation and it is launched along with the navigation launch file.


