agentleFS
enesbirlikenesbirlik/claude-code-robotics/skills/ros2-ecosystem-packages/SKILL.md

ros2-ecosystem-packages

Skill2 starsChanged 54 days agoMITView on GitHub

Use when deciding which existing ROS 2 package already solves a need (control, navigation, manipulation, SLAM, sensor fusion, simulation bridging, recording, visualization, diagnostics, teleoperation, microcontroller bridging) before writing custom code — a curated reference to the 20 most important ROS 2 packages, what each does, when to reach for it, install commands, and pointers to the other skills in this plugin that go deeper.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing a custom node for a capability listed below, use the maintained upstream package instead.

    line 8
  2. Very specific:

    Always pass an explicit timeout to lookup_transform — an un-bounded lookup that never resolves (a missing publisher, a broken TF tree) …

    line 59
  3. Very specific:

    Use rclpy.time.Time() (i.e.

    line 61
  4. Very specific:

    Always include /tf_static alongside /tf when recording anything you'll want to visualize later — static transforms are published once …

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ROS 2 Ecosystem: The 20 Packages to Reach For First

Before writing a custom node for a capability listed below, use the maintained upstream package instead. Reinventing TF broadcasting, SLAM, a diff-drive controller, or a bag recorder is wasted effort and a common source of subtle bugs (frame timing, QoS mismatches, coordinate convention errors) that these packages have already had years of real-world use to fix. Install commands below use the binary APT packages (ros-<distro>-<package>, distro = humble or jazzy); prefer these over building from source unless you need an unreleased fix.

Quick reference

#PackagePurposeReach for it when...
1rclcpp / rclpyCore C++/Python client librariesWriting any ROS 2 node — see [[ros2-workspace]].
2tf2 (tf2_ros, tf2_geometry_msgs)Coordinate frame transforms over timeYou need to know where one frame is relative to another, now or in the past.
3robot_state_publisherPublishes TF from a URDF + joint statesYou have a URDF and need /tf for every link, not just the base.
4joint_state_publisher / _guiPublishes/edits /joint_statesVisualizing or manually testing a URDF without real hardware.
5xacroMacro-expands .xacro into .urdfAny non-trivial robot description — see [[urdf-xacro-builder]].
6launch / launch_rosDeclarative multi-node bringupStarting more than one node together with shared arguments.
7ros2_control + ros2_controllersReal-time hardware abstraction + standard controllersYou need a diff-drive, joint-trajectory, or effort controller instead of hand-rolled PID nodes — see [[ros2-control]].
8navigation2 (Nav2)Autonomous mobile robot navigation stackPath planning, obstacle avoidance, costmaps — see [[nav2-moveit2-config]].
9moveit2Motion planning for manipulatorsArm/gripper trajectory planning, collision-aware IK — see [[nav2-moveit2-config]].
10slam_toolbox2D SLAM (mapping + localization)Building a map from a lidar with no prior map, online or offline.
11robot_localizationEKF/UKF sensor fusionFusing wheel odometry + IMU (+ GPS) into one continuous odom/map estimate.
12behaviortree.cpp (behaviortree_cpp)Behavior tree execution engineSequencing recoverable, composable robot behaviors — Nav2's BT navigator is built on it.
13rosbag2Record/replay topic dataCapturing sensor/log data for offline debugging or dataset collection.
14rviz23D visualizationInspecting TF, sensor data, costmaps, or planned trajectories visually.
15rqt (rqt_graph, rqt_console, rqt_plot)GUI debugging tool suiteVisualizing the node/topic graph, tailing logs, or plotting a signal live.
16ros_gz (ros_gz_bridge, ros_gz_sim, gz_ros2_control)ROS 2 ⟷ Gazebo Sim bridgeSimulating a robot in Gazebo and bridging its topics/clock into ROS 2 — see [[urdf-xacro-builder]].
17image_transport + cv_bridgeEfficient image topics + OpenCV interopPublishing/subscribing camera images, especially compressed, or converting to/from cv::Mat.
18diagnostic_updater + diagnostic_aggregatorStandardized system health reportingReporting node/hardware health in a way rqt_robot_monitor//diagnostics consumers expect.
19teleop_twist_keyboard + joyManual teleoperationDriving a robot by keyboard or gamepad for a smoke test, no custom teleop node needed.
20micro-ROS (micro_ros_setup, rclc, micro-ROS Agent)ROS 2 client stack for microcontrollersBridging an STM32/ESP32 into the ROS 2 graph — see [[embedded-ros-bridge]].

Also worth knowing, just past the top 20: rosbridge_suite / foxglove_bridge (WebSocket bridges for browser-based tooling like Foxglove Studio), plotjuggler (standalone bag/live signal plotting), ros2_socketcan (a ready-made SocketCAN ⟷ ROS 2 bridge node, an alternative to hand-writing the CAN bridge shown in [[embedded-ros-bridge]]).

Deeper notes on the highest-leverage / most-misused packages

tf2 — coordinate transforms

from tf2_ros import Buffer, TransformListener
from rclpy.duration import Duration

self._tf_buffer = Buffer()
self._tf_listener = TransformListener(self._tf_buffer, self)
transform = self._tf_buffer.lookup_transform(
    'base_link', 'laser_frame', rclpy.time.Time(), timeout=Duration(seconds=0.2))
  • Always pass an explicit timeout to lookup_transform — an un-bounded lookup that never resolves (a missing publisher, a broken TF tree) hangs the calling thread indefinitely.
  • Use rclpy.time.Time() (i.e. "latest available") for most control-loop lookups; only request a specific past stamp when you genuinely need to transform a timestamped sensor reading.
  • A LookupException/ExtrapolationException almost always means a broken or incomplete TF tree (a missing robot_state_publisher, a static transform never published) — fix the tree, don't catch-and-ignore the exception.

slam_toolbox vs robot_localization — don't confuse the two

  • slam_toolbox answers "where am I, and what does the map look like?" from lidar scan matching. It publishes map -> odom.
  • robot_localization answers "what's my best continuous pose estimate from these sensors?" by fusing odometry/IMU/GPS. It typically publishes odom -> base_link (and can publish map -> odom too if configured as the global fusion node, but don't run two nodes both publishing the same TF edge).
  • A common misconfiguration is running both slam_toolbox and robot_localization each trying to publish map -> odom — pick exactly one authority per TF edge.

rosbag2 — record only what you need

ros2 bag record /scan /tf /tf_static /odom -o my_test_run
ros2 bag play my_test_run
  • Explicitly list topics rather than -a (all) on a real robot — recording high-rate raw camera/lidar topics unbounded will fill disk and can starve I/O for other processes.
  • Always include /tf_static alongside /tf when recording anything you'll want to visualize later — static transforms are published once (transient-local) and are easy to miss if the recorder started after they were published, unless the topic is explicitly subscribed.

image_transport + cv_bridge — don't publish raw images if you can help it

from cv_bridge import CvBridge
bridge = CvBridge()
ros_image = bridge.cv2_to_imgmsg(cv_frame, encoding='bgr8')
  • Publish through image_transport (which offers compressed, theora, etc. transports automatically) rather than raw sensor_msgs/Image on bandwidth-constrained links (Wi-Fi to a base station, a slow serial-tunneled connection).
  • Match the encoding string (bgr8, mono8, rgb8, ...) to what the array actually contains — a mismatched encoding is a common source of a visually "wrong colors" but otherwise functioning image pipeline.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.