@@ -41,29 +41,33 @@ class ActionClient extends EventEmitter {
4141
4242 const nh = options . nh ;
4343
44- // FIXME: support user options for these parameters
44+ const goalOptions = Object . assign ( { queueSize : 10 , latching : true } , options . goal ) ;
4545 this . _goalPub = nh . advertise ( this . _actionServer + '/goal' ,
4646 this . _actionType + 'Goal' ,
47- { queueSize : 1 , latching : true } ) ;
47+ goalOptions ) ;
4848
49+ const cancelOptions = Object . assign ( { queueSize : 10 , latching : true } , options . cancel ) ;
4950 this . _cancelPub = nh . advertise ( this . _actionServer + '/cancel' ,
5051 'actionlib_msgs/GoalID' ,
51- { queueSize : 1 , latching : true } ) ;
52+ cancelOptions ) ;
5253
54+ const statusOptions = Object . assign ( { queueSize : 1 } , options . status ) ;
5355 this . _statusSub = nh . subscribe ( this . _actionServer + '/status' ,
5456 'actionlib_msgs/GoalStatusArray' ,
5557 ( msg ) => { this . _handleStatus ( msg ) ; } ,
56- { queueSize : 1 } ) ;
58+ statusOptions ) ;
5759
60+ const feedbackOptions = Object . assign ( { queueSize : 1 } , options . feedback ) ;
5861 this . _feedbackSub = nh . subscribe ( this . _actionServer + '/feedback' ,
5962 this . _actionType + 'Feedback' ,
6063 ( msg ) => { this . _handleFeedback ( msg ) ; } ,
61- { queueSize : 1 } ) ;
64+ feedbackOptions ) ;
6265
66+ const resultOptions = Object . assign ( { queueSize : 1 } , options . result ) ;
6367 this . _resultSub = nh . subscribe ( this . _actionServer + '/result' ,
6468 this . _actionType + 'Result' ,
6569 ( msg ) => { this . _handleResult ( msg ) ; } ,
66- { queueSize : 1 } ) ;
70+ resultOptions ) ;
6771
6872 this . _goals = { } ;
6973 this . _goalCallbacks = { } ;
@@ -134,6 +138,6 @@ class ActionClient extends EventEmitter {
134138 } ) ;
135139 return id ;
136140 }
137- } ;
141+ }
138142
139143module . exports = ActionClient ;
0 commit comments