From de880085546ce7f7947a8449f21ba799940b9ef2 Mon Sep 17 00:00:00 2001 From: Minggang Wang Date: Fri, 4 Jul 2025 15:50:25 +0800 Subject: [PATCH] Reorg the README structure --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ec4c4a94..cb2bdaa6 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ rclnodejs.init().then(() => { - [API Documentation](#api-documentation) - [Using TypeScript](#using-rclnodejs-with-typescript) - [ROS2 Interface Message Generation](#ros2-interface-message-generation-important) -- [IDL Message Generation](#idl-message-generation) - [Examples](https://github.com/RobotWebTools/rclnodejs/tree/develop/example) - [Electron demo](https://github.com/RobotWebTools/rclnodejs/tree/develop/electron_demo) - [Efficient Usage Tips](./docs/EFFICIENCY.md) @@ -148,18 +147,6 @@ let stringMsgObject = rclnodejs.createMessageObject('std_msgs/msg/String'); stringMsgObject.data = 'hello world'; ``` -## IDL Message Generation - -In addition to the standard ROS2 message generation (`.msg`, `.srv`, and `.action`), rclnodejs provides advanced support for generating JavaScript message files directly from IDL (Interface Definition Language) files. This feature is particularly useful when working with custom IDL files or when you need more control over the message generation process. - -### Running `generate-messages-idl` - -To generate messages from IDL files, use the `generate-messages-idl` npm script: - -```bash -npm run generate-messages-idl -``` - ### Maintaining Generated JavaScript Message Files Message files are generated as a post-install step of the rclnodejs @@ -178,6 +165,18 @@ npx generate-ros-messages The newly generated JavaScript files can be found at `/node_modules/rclnodejs/generated/`. +### IDL Message Generation + +In addition to the standard ROS2 message generation (`.msg`, `.srv`, and `.action`), rclnodejs provides advanced support for generating JavaScript message files directly from IDL (Interface Definition Language) files. This feature is particularly useful when working with custom IDL files or when you need more control over the message generation process. + +#### Running `generate-messages-idl` + +To generate messages from IDL files, use the `generate-messages-idl` npm script: + +```bash +npm run generate-messages-idl +``` + ## Contributing Please read the [Contributing Guide]() before making a pull request.