- Home
- Skills
- Agents & Orchestration
- ros2 gazebo development
ros2 gazebo development
Build, bridge, and debug ROS 2 Python nodes and Gazebo simulations with version-accurate integration.
$12
Works with the AI Agents you already use
ros2 gazebo development
Example session with this skill installed
Create a ROS 2 Python node called 'ranger_filter' that subscribes to '/scan', filters out values over 5.0 meters, and publishes to '/scan_filtered'. Add a bridge for modern Gazebo.
- Read your context and instructions
- Compiled the ros2 gazebo development
Assumptions: modern Gazebo (gz transport), a ROS 2 installation with a compatible ros_gz_bridge, and the Gazebo lidar already publishing a LaserScan on /scan. The node copies each message before editing it, keeps scan metadata, and changes only finite ranges above 5 m to positive infinity. Existing NaN and infinity readings are preserved.
Node: ranger_filter/filter_node.py
from copy import deepcopy
import math
import rclpy
from rclpy.node import Node
from rclpy.qos import qos_profile_sensor_data
from sensor_msgs.msg import LaserScan
class RangerFilter(Node):
def __init__(self):
super().__init__("ranger_filter")
self.subscription = self.create_subscription(
LaserScan, "/scan", self.on_scan, qos_profile_sensor_data
)
self.publisher = self.create_publisher(
LaserScan, "/scan_filtered", qos_profile_sensor_data
)
def on_scan(self, msg: LaserScan) -> None:
filtered = deepcopy(msg)
filtered.ranges = [
value if not math.isfinite(value) or value <= 5.0 else math.inf
for value in msg.ranges
]
self.publisher.publish(filtered)
def main(args=None):
rclpy.init(args=args)
node = RangerFilter()
try:
rclpy.spin(node)
except KeyboardInterrupt:
pass
finally:
node.destroy_node()
rclpy.shutdown()
if __name__ == "__main__":
main()
Modern Gazebo bridge: bridge.yaml
- topic_name: /scan
ros_type_name: sensor_msgs/msg/LaserScan
gz_type_name: gz.msgs.LaserScan
direction: GZ_TO_ROS
Expose main as a console-script entry point in the ament_python package, and declare rclpy and sensor_msgs in package.xml. The bridge needs the ros_gz_bridge package and a Gazebo topic whose message is gz.msgs.LaserScan.
Build and run
colcon build --symlink-install
source install/setup.bash
ros2 run ranger_filter filter_node
ros2 run ros_gz_bridge parameter_bridge --bridge-config-file bridge.yaml
Confirm the actual Gazebo lidar topic and bridge direction for your world; the example assumes Gazebo-to-ROS input on /scan. This example is configuration guidance and has not been run in a ROS/Gazebo environment.
Connects securely to your tools. The creator never sees your data.
About this skill
Robotics development is plagued by version mismatches between ROS 2 distributions and Gazebo generations. This skill provides a specialized engineer for building, bridging, and debugging rclpy nodes and simulation environments without the common pitfalls of mixing Gazebo Classic and modern Gazebo (formerly Ignition) syntax.
What it does
- Package scaffolding creates or updates
ament_pythonpackages with correctsetup.py,package.xml, and resource markers. - Node implementation writes
rclpynodes with publishers, subscribers, services, and parameters using clean executor patterns. - Simulation bridging configures
ros_gz_bridgeorgazebo_ros_pkgsto sync topics, transforms, and/clockbetween ROS and the simulator. - Launch coordination builds Python launch files to manage multi-node systems, parameter files, and simulator processes.
- Troubleshooting identifies failures in the build output, plugin loading, QoS mismatches, or Gazebo transport direction.
How it works
- Environment Audit: Inspects your repo to detect ROS distribution (Humble, Jazzy, etc.) and Gazebo version.
- Implementation: Generates Python nodes or simulation assets (SDF/World files) following your project's conventions.
- Integration: Configures the bridge between ROS 2 and Gazebo, ensuring message types and directions are mapped correctly.
- Execution: Provides specific
colconbuild commands and setup steps tailored to your OS and shell.
Frameworks & tools
ROS 2 (rclpy), Gazebo (Classic and Sim/Ignition), ros_gz, ament_python, colcon, and Python.
Why this beats prompting it yourself
Most LLMs hallucinate Gazebo plugin names or mix up ignition commands with the new gz CLI. This skill enforces strict version consistency and ensures simulation time and QoS settings are correctly handled so your nodes actually receive data.
Use cases
- Scaffold a new ROS 2 Python package with Gazebo sensor integration.
- Bridge Gazebo lidar or camera data to ROS 2 topics with correct QoS.
- Debug why a robot model fails to spawn or why a plugin isn't loading.
- Create multi-robot launch files with namespacing and remapping.
Known limitations
Does not support C++ node development (ament_cmake). Does not perform automated migration between Gazebo generations unless explicitly requested.
Focuses on Python (rclpy) only; C++ is not supported. User must have a working ROS 2/Gazebo installation; this skill does not install the core system software.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
Requires