hamals_robot_description is a ROS 2 ament_python package for the HAMALS forklift-style AGV robot description.
It is used to visualize the robot model in RViz, run the robot in a Gazebo Sim world, manage robot geometry from one YAML configuration file, and generate the Gazebo SDF model automatically from that YAML file.
Example development paths may be ~/develop/ros2_ws for the ROS 2 workspace and ~/develop/ros2_ws/hamals_robot_description for this package.
- HAMALS forklift-style AGV robot description
- RViz visualization using URDF/Xacro
- Gazebo Sim world with the robot model
- Geometry managed from
config/robot_dimensions.yaml - Automatic Gazebo SDF generation
- Gazebo workflow script for common server, GUI, update, check, and clean tasks
hamals_robot_description/
├── config/
│ └── robot_dimensions.yaml
├── launch/
│ ├── display.launch.py
│ └── gazebo.launch.py
├── models/
│ └── hamals_robot/
│ ├── model.config
│ └── model.sdf
├── scripts/
│ ├── generate_gazebo_model.py
│ └── hamals_gazebo.sh
├── urdf/
│ └── hamals_robot.urdf.xacro
├── worlds/
│ └── hamals_empty.world.sdf
└── requirements.txt
Important files:
config/robot_dimensions.yaml: main source of robot dimensions. Treat this as the single source of truth.urdf/hamals_robot.urdf.xacro: main URDF/Xacro model used by RViz androbot_state_publisher.models/hamals_robot/model.sdf: generated Gazebo model file. Do not edit this manually.models/hamals_robot/model.config: Gazebo model metadata.worlds/hamals_empty.world.sdf: Gazebo world file. It includes the robot usingmodel://hamals_robot.launch/display.launch.py: launches RViz visualization.launch/gazebo.launch.py: starts Gazebo server androbot_state_publisher. Keep this file because the shell workflow script calls it.scripts/generate_gazebo_model.py: readsconfig/robot_dimensions.yamland generatesmodels/hamals_robot/model.sdf.scripts/hamals_gazebo.sh: main Gazebo workflow script.requirements.txt: Python pip dependencies.
+X: forward / fork direction+Y: left+Z: upbase_footprint: ground reference framebase_link: main robot body reference frame
The robot structure includes the main chassis/body, left and right drive wheels, rear caster wheel, forklift mast, moving carriage, left and right forks, and a top-mounted lidar.
- ROS 2
colconxacrorobot_state_publisherjoint_state_publisher_gui- RViz2
- Gazebo Sim /
gz ros_gz_sim- PyYAML
Install the Python dependencies from the package directory:
cd <path_to_hamals_robot_description>
conda activate ros2
pip install -r requirements.txtrequirements.txt currently contains:
PyYAML>=6.0
Build the package from the workspace root:
cd <your_ros2_workspace>
rm -rf build install log
colcon build --packages-select hamals_robot_description
source install/setup.zshcd <your_ros2_workspace>
source install/setup.zsh
ros2 launch hamals_robot_description display.launch.pyRViz is used to inspect the URDF/Xacro model, TF tree, links, joints, wheels, lidar, mast, carriage, and forks. RViz does not run physics simulation.
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh serverThis generates the Gazebo model from YAML, rebuilds the workspace, and starts the Gazebo server.
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh guiThis starts the Gazebo GUI with the correct model path.
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh updateUse this after editing config/robot_dimensions.yaml.
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh checkThis checks whether hamals_robot exists in the Gazebo world.
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh cleanThis stops Gazebo-related processes started by the workflow.
The robot geometry workflow is:
- Edit
config/robot_dimensions.yaml. - Generate
models/hamals_robot/model.sdf. - Rebuild the ROS 2 workspace.
- Start Gazebo.
config/robot_dimensions.yaml is the geometry source. models/hamals_robot/model.sdf is generated from it and should not be edited manually.
After changing geometry, run:
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh serverThe script will regenerate model.sdf, rebuild the workspace, and start the Gazebo server.
On macOS, run the Gazebo server and GUI separately.
Terminal 1:
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh serverTerminal 2:
cd <path_to_hamals_robot_description>
./scripts/hamals_gazebo.sh guiIf the Gazebo GUI has Qt conflicts, run the GUI command from a clean terminal outside the ROS conda environment.
config/robot_dimensions.yamlis the single source of truth for geometry.models/hamals_robot/model.sdfis generated and should not be manually edited.scripts/hamals_gazebo.shis the recommended Gazebo entry point.launch/gazebo.launch.pyshould remain because the shell script calls it.- RViz is for model inspection; Gazebo is for simulation.