Skip to content

Commit 0df46cd

Browse files
committed
generated files, publishing workflow
1 parent 40ee701 commit 0df46cd

File tree

174 files changed

+16205
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+16205
-0
lines changed

generate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ set -euo pipefail
44

55
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66

7+
mkdir -p "$SCRIPT_DIR/generated"
8+
79
python3 "$SCRIPT_DIR/sources/ros_to_lcm.py"
810

911
echo -e "\033[32mRos -> LCM done\033[0m"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Auto-generated by lcm-ts. DO NOT EDIT.
2+
3+
import { Time } from "../std_msgs/Time.ts";
4+
5+
export class GoalID {
6+
static readonly _HASH = 0xe6e8e4d2dcced2c8n;
7+
static readonly _NAME = "actionlib_msgs.GoalID";
8+
9+
stamp: Time;
10+
id: string;
11+
12+
constructor(init?: Partial<GoalID>) {
13+
this.stamp = init?.stamp ?? new Time();
14+
this.id = init?.id ?? "";
15+
}
16+
17+
static decode(data: Uint8Array): GoalID {
18+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
19+
let offset = 0;
20+
21+
// Verify fingerprint
22+
const hash = view.getBigUint64(offset, false);
23+
offset += 8;
24+
if (hash !== GoalID._HASH) {
25+
throw new Error(`Hash mismatch: expected ${GoalID._HASH.toString(16)}, got ${hash.toString(16)}`);
26+
}
27+
28+
const result = new GoalID();
29+
({ offset } = GoalID._decodeOne(view, offset, result));
30+
return result;
31+
}
32+
33+
static _decodeOne(view: DataView, offset: number, target: GoalID): { offset: number } {
34+
target.stamp = new Time();
35+
({ offset } = Time._decodeOne(view, offset, target.stamp));
36+
{
37+
const len = view.getUint32(offset, false);
38+
offset += 4;
39+
target.id = new TextDecoder().decode(new Uint8Array(view.buffer, view.byteOffset + offset, len - 1));
40+
offset += len;
41+
}
42+
return { offset };
43+
}
44+
45+
encode(): Uint8Array {
46+
const size = 8 + this._encodedSize();
47+
const data = new Uint8Array(size);
48+
const view = new DataView(data.buffer);
49+
let offset = 0;
50+
51+
// Write fingerprint
52+
view.setBigUint64(offset, GoalID._HASH, false);
53+
offset += 8;
54+
55+
offset = this._encodeOne(view, offset);
56+
return data;
57+
}
58+
59+
_encodeOne(view: DataView, offset: number): number {
60+
offset = this.stamp._encodeOne(view, offset);
61+
{
62+
const encoded = new TextEncoder().encode(this.id);
63+
view.setUint32(offset, encoded.length + 1, false);
64+
offset += 4;
65+
new Uint8Array(view.buffer, view.byteOffset + offset).set(encoded);
66+
offset += encoded.length;
67+
view.setUint8(offset, 0); // null terminator
68+
offset += 1;
69+
}
70+
return offset;
71+
}
72+
73+
_encodedSize(): number {
74+
let size = 0;
75+
size += this.stamp._encodedSize();
76+
size += 4 + new TextEncoder().encode(this.id).length + 1;
77+
return size;
78+
}
79+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// Auto-generated by lcm-ts. DO NOT EDIT.
2+
3+
import { GoalID } from "./GoalID.ts";
4+
5+
export class GoalStatus {
6+
static readonly _HASH = 0xe4d2dccee8caf0e8n;
7+
static readonly _NAME = "actionlib_msgs.GoalStatus";
8+
9+
static readonly PENDING = 0;
10+
static readonly ACTIVE = 1;
11+
static readonly PREEMPTED = 2;
12+
static readonly SUCCEEDED = 3;
13+
static readonly ABORTED = 4;
14+
static readonly REJECTED = 5;
15+
static readonly PREEMPTING = 6;
16+
static readonly RECALLING = 7;
17+
static readonly RECALLED = 8;
18+
static readonly LOST = 9;
19+
20+
goal_id: GoalID;
21+
status: number;
22+
text: string;
23+
24+
constructor(init?: Partial<GoalStatus>) {
25+
this.goal_id = init?.goal_id ?? new GoalID();
26+
this.status = init?.status ?? 0;
27+
this.text = init?.text ?? "";
28+
}
29+
30+
static decode(data: Uint8Array): GoalStatus {
31+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
32+
let offset = 0;
33+
34+
// Verify fingerprint
35+
const hash = view.getBigUint64(offset, false);
36+
offset += 8;
37+
if (hash !== GoalStatus._HASH) {
38+
throw new Error(`Hash mismatch: expected ${GoalStatus._HASH.toString(16)}, got ${hash.toString(16)}`);
39+
}
40+
41+
const result = new GoalStatus();
42+
({ offset } = GoalStatus._decodeOne(view, offset, result));
43+
return result;
44+
}
45+
46+
static _decodeOne(view: DataView, offset: number, target: GoalStatus): { offset: number } {
47+
target.goal_id = new GoalID();
48+
({ offset } = GoalID._decodeOne(view, offset, target.goal_id));
49+
target.status = view.getUint8(offset);
50+
offset += 1;
51+
{
52+
const len = view.getUint32(offset, false);
53+
offset += 4;
54+
target.text = new TextDecoder().decode(new Uint8Array(view.buffer, view.byteOffset + offset, len - 1));
55+
offset += len;
56+
}
57+
return { offset };
58+
}
59+
60+
encode(): Uint8Array {
61+
const size = 8 + this._encodedSize();
62+
const data = new Uint8Array(size);
63+
const view = new DataView(data.buffer);
64+
let offset = 0;
65+
66+
// Write fingerprint
67+
view.setBigUint64(offset, GoalStatus._HASH, false);
68+
offset += 8;
69+
70+
offset = this._encodeOne(view, offset);
71+
return data;
72+
}
73+
74+
_encodeOne(view: DataView, offset: number): number {
75+
offset = this.goal_id._encodeOne(view, offset);
76+
view.setUint8(offset, this.status);
77+
offset += 1;
78+
{
79+
const encoded = new TextEncoder().encode(this.text);
80+
view.setUint32(offset, encoded.length + 1, false);
81+
offset += 4;
82+
new Uint8Array(view.buffer, view.byteOffset + offset).set(encoded);
83+
offset += encoded.length;
84+
view.setUint8(offset, 0); // null terminator
85+
offset += 1;
86+
}
87+
return offset;
88+
}
89+
90+
_encodedSize(): number {
91+
let size = 0;
92+
size += this.goal_id._encodedSize();
93+
size += 1;
94+
size += 4 + new TextEncoder().encode(this.text).length + 1;
95+
return size;
96+
}
97+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// Auto-generated by lcm-ts. DO NOT EDIT.
2+
3+
import { Header } from "../std_msgs/Header.ts";
4+
import { GoalStatus } from "./GoalStatus.ts";
5+
6+
export class GoalStatusArray {
7+
static readonly _HASH = 0xeae6bed8d2e6e800n;
8+
static readonly _NAME = "actionlib_msgs.GoalStatusArray";
9+
10+
status_list_length: number;
11+
header: Header;
12+
status_list: GoalStatus[];
13+
14+
constructor(init?: Partial<GoalStatusArray>) {
15+
this.status_list_length = init?.status_list_length ?? 0;
16+
this.header = init?.header ?? new Header();
17+
this.status_list = init?.status_list ?? [];
18+
}
19+
20+
static decode(data: Uint8Array): GoalStatusArray {
21+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
22+
let offset = 0;
23+
24+
// Verify fingerprint
25+
const hash = view.getBigUint64(offset, false);
26+
offset += 8;
27+
if (hash !== GoalStatusArray._HASH) {
28+
throw new Error(`Hash mismatch: expected ${GoalStatusArray._HASH.toString(16)}, got ${hash.toString(16)}`);
29+
}
30+
31+
const result = new GoalStatusArray();
32+
({ offset } = GoalStatusArray._decodeOne(view, offset, result));
33+
return result;
34+
}
35+
36+
static _decodeOne(view: DataView, offset: number, target: GoalStatusArray): { offset: number } {
37+
target.status_list_length = view.getInt32(offset, false);
38+
offset += 4;
39+
target.header = new Header();
40+
({ offset } = Header._decodeOne(view, offset, target.header));
41+
target.status_list = new Array(target.status_list_length);
42+
for (let i0 = 0; i0 < target.status_list_length; i0++) {
43+
target.status_list[i0] = new GoalStatus();
44+
({ offset } = GoalStatus._decodeOne(view, offset, target.status_list[i0]));
45+
}
46+
return { offset };
47+
}
48+
49+
encode(): Uint8Array {
50+
const size = 8 + this._encodedSize();
51+
const data = new Uint8Array(size);
52+
const view = new DataView(data.buffer);
53+
let offset = 0;
54+
55+
// Write fingerprint
56+
view.setBigUint64(offset, GoalStatusArray._HASH, false);
57+
offset += 8;
58+
59+
offset = this._encodeOne(view, offset);
60+
return data;
61+
}
62+
63+
_encodeOne(view: DataView, offset: number): number {
64+
view.setInt32(offset, this.status_list_length, false);
65+
offset += 4;
66+
offset = this.header._encodeOne(view, offset);
67+
for (let i0 = 0; i0 < this.status_list_length; i0++) {
68+
offset = this.status_list[i0]._encodeOne(view, offset);
69+
}
70+
return offset;
71+
}
72+
73+
_encodedSize(): number {
74+
let size = 0;
75+
size += 4;
76+
size += this.header._encodedSize();
77+
for (let i0 = 0; i0 < this.status_list_length; i0++) {
78+
size += this.status_list[i0]._encodedSize();
79+
}
80+
return size;
81+
}
82+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Auto-generated by lcm-ts. DO NOT EDIT.
2+
3+
export class Duration {
4+
static readonly _HASH = 0xe8dcc2dcdee6cac6n;
5+
static readonly _NAME = "builtin_interfaces.Duration";
6+
7+
sec: number;
8+
nanosec: number;
9+
10+
constructor(init?: Partial<Duration>) {
11+
this.sec = init?.sec ?? 0;
12+
this.nanosec = init?.nanosec ?? 0;
13+
}
14+
15+
static decode(data: Uint8Array): Duration {
16+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
17+
let offset = 0;
18+
19+
// Verify fingerprint
20+
const hash = view.getBigUint64(offset, false);
21+
offset += 8;
22+
if (hash !== Duration._HASH) {
23+
throw new Error(`Hash mismatch: expected ${Duration._HASH.toString(16)}, got ${hash.toString(16)}`);
24+
}
25+
26+
const result = new Duration();
27+
({ offset } = Duration._decodeOne(view, offset, result));
28+
return result;
29+
}
30+
31+
static _decodeOne(view: DataView, offset: number, target: Duration): { offset: number } {
32+
target.sec = view.getInt32(offset, false);
33+
offset += 4;
34+
target.nanosec = view.getInt32(offset, false);
35+
offset += 4;
36+
return { offset };
37+
}
38+
39+
encode(): Uint8Array {
40+
const size = 8 + this._encodedSize();
41+
const data = new Uint8Array(size);
42+
const view = new DataView(data.buffer);
43+
let offset = 0;
44+
45+
// Write fingerprint
46+
view.setBigUint64(offset, Duration._HASH, false);
47+
offset += 8;
48+
49+
offset = this._encodeOne(view, offset);
50+
return data;
51+
}
52+
53+
_encodeOne(view: DataView, offset: number): number {
54+
view.setInt32(offset, this.sec, false);
55+
offset += 4;
56+
view.setInt32(offset, this.nanosec, false);
57+
offset += 4;
58+
return offset;
59+
}
60+
61+
_encodedSize(): number {
62+
let size = 0;
63+
size += 4;
64+
size += 4;
65+
return size;
66+
}
67+
}

0 commit comments

Comments
 (0)