Skip to content

Commit

Permalink
We have enums fr fr
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Nov 22, 2024
1 parent 651577e commit 77302aa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
16 changes: 1 addition & 15 deletions src/core/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,7 @@

import { EventEmitter } from 'eventemitter3';
import Ros from '../core/Ros.js';

/**
* An "enumeration" for goal statuses.
* This is directly based on the action_msgs/GoalStatus ROS message:
* https://docs.ros2.org/latest/api/action_msgs/msg/GoalStatus.html
*/
const GoalStatus = Object.freeze({
STATUS_UNKNOWN: 0,
STATUS_ACCEPTED: 1,
STATUS_EXECUTING: 2,
STATUS_CANCELING: 3,
STATUS_SUCCEEDED: 4,
STATUS_CANCELED: 5,
STATUS_ABORTED: 6
});
import { GoalStatus } from '../core/GoalStatus.ts'

/**
* A ROS 2 action client.
Expand Down
14 changes: 14 additions & 0 deletions src/core/GoalStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* An enumeration for goal statuses.
* This is directly based on the action_msgs/GoalStatus ROS message:
* https://docs.ros2.org/latest/api/action_msgs/msg/GoalStatus.html
*/
export enum GoalStatus {
STATUS_UNKNOWN = 0,
STATUS_ACCEPTED = 1,
STATUS_EXECUTING = 2,
STATUS_CANCELING = 3,
STATUS_SUCCEEDED = 4,
STATUS_CANCELED = 5,
STATUS_ABORTED = 6
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"rootDir": "./src" /* Specify the root folder within your source files. */,
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
"checkJs": true /* Enable error reporting in type-checked JavaScript files. */,
"allowImportingTsExtensions": true /* Enable importing TypeScript files. */,
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
"outDir": "./tsbuild" /* Specify an output folder for all emitted files. */,
"declarationDir": "./build" /* Specify the output directory for generated declaration files. */,
Expand Down

0 comments on commit 77302aa

Please sign in to comment.