Skip to content

AUSRA-Team/ausra_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUSRA Simulation Package

This ROS 2 package provides simulation environments for the AUSRA omnidirectional robot using Gazebo Fortress (gz-sim).

Overview

The ausra_simulation package contains:

  • Worlds: Multiple simulation environments (empty, room, warehouse)
  • Models: Gazebo models for obstacles and environments
  • Maps: Pre-generated 2D maps for navigation testing
  • Launch files: Per-world launch files for easy simulation startup

Package Structure

ausra_simulation/
├── CMakeLists.txt
├── package.xml
├── README.md
├── config/
│   └── gazebo_params.yaml       # Gazebo simulation parameters
├── gui/
│   └── gui.config               # Gazebo GUI layout configuration
├── launch/
│   ├── empty_world.launch.py    # Empty world simulation
│   ├── room_world.launch.py     # Indoor room with walls
│   └── warehouse.launch.py      # Warehouse with obstacles
├── maps/
│   ├── room.yaml                # Room world map config
│   ├── room.png                 # Room world map image
│   ├── warehouse.yaml           # Warehouse map config
│   └── warehouse.pgm            # Warehouse map image
├── models/
│   ├── construction_cone/       # Traffic cone obstacle
│   ├── neo_office_box/          # Stackable office boxes
│   ├── neo_wall_box/            # Wall segment
│   ├── neo_workshop_walls/      # Workshop wall structure
│   ├── room_with_walls_1/       # Room with internal walls
│   └── yellow_bin/              # Yellow garbage bin
├── rviz/
│   └── simulation.rviz          # RViz configuration for simulation
└── worlds/
    ├── empty_world.sdf          # Empty world (ground plane only)
    ├── room_world.sdf           # Room with walls for indoor nav
    └── warehouse.sdf            # Warehouse with obstacles

Dependencies

  • ausrabot_description - Robot URDF and configuration
  • omnidirectional_driver - Custom omnidirectional wheel driver
  • ros_gz_sim - Gazebo Fortress simulation
  • ros_gz_bridge - ROS-Gazebo topic bridge
  • gz_ros2_control - ros2_control integration with Gazebo

Usage

Launch Empty World

Basic simulation with just a ground plane:

ros2 launch ausra_simulation empty_world.launch.py

Launch Room World

Indoor simulation with walls for navigation testing:

ros2 launch ausra_simulation room_world.launch.py

Launch Warehouse World

Complex environment with obstacles (boxes, cones, walls):

ros2 launch ausra_simulation warehouse.launch.py

Launch Office World

Structured office environment with hallways and rooms:

ros2 launch ausra_simulation office_world.launch.py

Launch Outdoor Plaza (Configurable Spawn)

Garden path environment with configurable robot start position and orientation:

# Default spawn (2, 2, 0.1)
ros2 launch ausra_simulation outdoor_plaza.launch.py

# Custom spawn at x=2.0, y=1.0, rotated 90 degrees
ros2 launch ausra_simulation outdoor_plaza.launch.py x:=2.0 y:=1.0 yaw:=1.57

Available Worlds

1. Empty World (empty_world.sdf)

  • Simple ground plane
  • Good for basic robot testing and debugging
  • Minimal computational load

2. Room World (room_world.sdf)

  • 10x10m indoor room with walls
  • Ideal for indoor navigation testing
  • Pre-generated map available: maps/room.yaml

3. Warehouse World (warehouse.sdf)

  • Warehouse environment with:
    • Workshop walls
    • Stacked office boxes
    • Construction cones
    • Various obstacles
  • Pre-generated map available: maps/warehouse.yaml
  • Great for obstacle avoidance and path planning tests

4. Office World (office_world.sdf)

  • Structured office floor plan with:
    • Central Corridor: Long hallway for narrow navigation.
    • Connected Rooms: Conference room and cubicle areas.
    • Doorways: Strategic gaps for room transition testing.

5. Outdoor Plaza (outdoor_plaza.sdf)

  • Open-air garden path environment:
    • Garden Paths: Defined walking loops with low curbs (0.3m).
    • Entry/Exits: Gaps in the central square loop for multiple approach angles.
    • Obstacles: Static debris on paths to force local replanning.
  • Launch with configurable spawn position (see below).

Pre-generated Maps

Maps are provided for navigation testing with Nav2:

World Map File Resolution
Room maps/room.yaml 0.10 m/px
Warehouse maps/warehouse.yaml 0.05 m/px

To use with Nav2 map server:

ros2 run nav2_map_server map_server --ros-args -p yaml_filename:=/path/to/ausra_simulation/share/ausra_simulation/maps/room.yaml

ROS Topics Bridged

The following topics are bridged between Gazebo and ROS 2:

Topic Type Direction
/clock rosgraph_msgs/msg/Clock GZ → ROS
/scan sensor_msgs/msg/LaserScan GZ → ROS
/imu sensor_msgs/msg/Imu GZ → ROS
/camera/image_raw sensor_msgs/msg/Image GZ → ROS
/camera/camera_info sensor_msgs/msg/CameraInfo GZ → ROS

Controllers Launched

Each launch file spawns:

  1. joint_state_broadcaster - Publishes joint states
  2. joint_group_velocity_controller - Velocity control for wheels
  3. omnidirectional_driver - Custom omni-wheel kinematics driver

Controlling the Robot

Use teleop_twist_keyboard or publish to /cmd_vel:

# Install teleop if needed
sudo apt install ros-${ROS_DISTRO}-teleop-twist-keyboard

# Run teleop
ros2 run teleop_twist_keyboard teleop_twist_keyboard

Visualization

Launch RViz with the provided configuration:

Visualization & GUI

RViz 2

Launch RViz with the provided configuration:

ros2 run rviz2 rviz2 -d $(ros2 pkg prefix ausra_simulation)/share/ausra_simulation/rviz/simulation.rviz

Gazebo GUI

The simulation uses a custom GUI configuration (gui.config) that includes:

  • Component Inspector: View detailed entity properties (Pose, Collisions).
  • Entity Tree: Inspect scene hierarchy.
  • Transform Control: Interactive object manipulation tools.
  • View Angle: Quick camera snapping controls.

Adding New Worlds

  1. Create a new SDF world file in worlds/
  2. Add any required models to models/
  3. Create a new launch file in launch/ (copy and modify existing one)
  4. Optionally generate a 2D map using SLAM and add to maps/

Troubleshooting

Models not loading

Ensure the GZ_SIM_RESOURCE_PATH environment variable includes the models directory. The launch files set this automatically.

Robot not spawning

Check that ausrabot_description package is built and the URDF is valid:

ros2 pkg prefix ausrabot_description

Simulation running slowly

Try reducing physics complexity or use a simpler world (empty_world).

License

MIT License - See LICENSE file for details.

About

Simulation Worlds and models

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors