Skip to content

Commit 2e68b43

Browse files
committed
Demo import fixes
1 parent 3978b47 commit 2e68b43

File tree

8 files changed

+9
-18
lines changed

8 files changed

+9
-18
lines changed

examples/action_client.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<script src="../build/roslib.js"></script>
5+
<script src="../dist/RosLib.umd.cjs"></script>
66

77
<script>
88
// Connecting to ROS

examples/action_server.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<script src="../build/roslib.js"></script>
5+
<script src="../dist/RosLib.umd.cjs"></script>
66

77
<script>
88
// Connecting to ROS

examples/math.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<script src="../build/roslib.js"></script>
5+
<script src="../dist/RosLib.umd.cjs"></script>
66

77
<script>
88
// Let's start by adding some vectors.

examples/ros2_action_client.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<script src="../build/roslib.js"></script>
5+
<script src="../dist/RosLib.umd.cjs"></script>
66

77
<script>
88
// Connecting to ROS

examples/ros2_action_server.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<script src="../build/roslib.js"></script>
5+
<script src="../dist/RosLib.umd.cjs"></script>
66

77
<script>
88
// Connecting to ROS

examples/ros2_simple.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<script src="https://static.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script>
6-
<script src="../build/roslib.js"></script>
5+
<script src="../dist/RosLib.umd.cjs"></script>
76

87
<script>
98
// Connecting to ROS

examples/simple.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<script src="../build/roslib.js"></script>
5+
<script src="../dist/RosLib.umd.cjs"></script>
66

77
<script>
88
// Connecting to ROS

src/actionlib/SimpleActionServer.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55

66
import Topic from '../core/Topic.js';
7-
import Message from '../core/Message.js';
87
import Ros from '../core/Ros.js';
98
import { EventEmitter } from 'eventemitter3';
109

@@ -83,10 +82,8 @@ export default class SimpleActionServer extends EventEmitter {
8382
// needs to happen AFTER rest is set up
8483
that.emit('cancel');
8584
} else {
86-
// @ts-expect-error -- we need to design a way to handle arbitrary fields in Message types.
87-
that.statusMessage.status_list = [
88-
{ goal_id: goalMessage.goal_id, status: 1 }
89-
];
85+
// @ts-ignore Don't know how to fix this
86+
that.statusMessage.status_list = [{ goal_id: goalMessage.goal_id, status: 1 }];
9087
that.currentGoal = goalMessage;
9188
that.emit('goal', goalMessage.goal);
9289
}
@@ -157,9 +154,7 @@ export default class SimpleActionServer extends EventEmitter {
157154
var nsecs = Math.round(
158155
1000000000 * (currentTime.getTime() / 1000 - secs)
159156
);
160-
// @ts-expect-error -- we need to design a way to handle arbitrary fields in Message types.
161157
that.statusMessage.header.stamp.secs = secs;
162-
// @ts-expect-error -- we need to design a way to handle arbitrary fields in Message types.
163158
that.statusMessage.header.stamp.nsecs = nsecs;
164159
statusPublisher.publish(that.statusMessage);
165160
}, 500); // publish every 500ms
@@ -176,7 +171,6 @@ export default class SimpleActionServer extends EventEmitter {
176171
});
177172
this.resultPublisher.publish(resultMessage);
178173

179-
// @ts-expect-error -- we need to design a way to handle arbitrary fields in Message types.
180174
this.statusMessage.status_list = [];
181175
if (this.nextGoal) {
182176
this.currentGoal = this.nextGoal;
@@ -198,7 +192,6 @@ export default class SimpleActionServer extends EventEmitter {
198192
});
199193
this.resultPublisher.publish(resultMessage);
200194

201-
// @ts-expect-error -- we need to design a way to handle arbitrary fields in Message types.
202195
this.statusMessage.status_list = [];
203196
if (this.nextGoal) {
204197
this.currentGoal = this.nextGoal;
@@ -224,7 +217,6 @@ export default class SimpleActionServer extends EventEmitter {
224217
* Handle case where client requests preemption.
225218
*/
226219
setPreempted() {
227-
// @ts-expect-error -- we need to design a way to handle arbitrary fields in Message types.
228220
this.statusMessage.status_list = [];
229221
var resultMessage = new Message({
230222
status: { goal_id: this.currentGoal.goal_id, status: 2 }

0 commit comments

Comments
 (0)