File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,13 @@ ActionClient.prototype.__proto__ = EventEmitter2.prototype;
125125 * Cancel all goals associated with this ActionClient.
126126 */
127127ActionClient . prototype . cancel = function ( ) {
128- var cancelMessage = new Message ( ) ;
128+ var date = new Date ( ) ;
129+ var cancelMessage = new Message ( {
130+ stamp : {
131+ secs : Math . floor ( date * 1e-3 ) ,
132+ nsecs : date % 1000 * 1000000
133+ }
134+ } ) ;
129135 this . cancelTopic . publish ( cancelMessage ) ;
130136} ;
131137
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ function Goal(options) {
3232 this . goalMessage = new Message ( {
3333 goal_id : {
3434 stamp : {
35- secs : 0 ,
36- nsecs : 0
35+ secs : Math . floor ( date * 1e-3 ) ,
36+ nsecs : date % 1000 * 1000000
3737 } ,
3838 id : this . goalID
3939 } ,
@@ -80,7 +80,12 @@ Goal.prototype.send = function(timeout) {
8080 * Cancel the current goal.
8181 */
8282Goal . prototype . cancel = function ( ) {
83+ var date = new Date ( ) ;
8384 var cancelMessage = new Message ( {
85+ stamp : {
86+ secs : Math . floor ( date * 1e-3 ) ,
87+ nsecs : date % 1000 * 1000000
88+ } ,
8489 id : this . goalID
8590 } ) ;
8691 this . actionClient . cancelTopic . publish ( cancelMessage ) ;
You can’t perform that action at this time.
0 commit comments