Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix :wait-interpolation-smooth for pr2_controllers_msgs/JointTrajectoryActionFeedback #235

Merged
merged 1 commit into from
Jun 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions pr2eus/robot-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@
(let ((finish-time) (current-time))
(ros::ros-debug "[~A] feedback-cb ~A" ros::name-space msg)
(unless (and (send ros::comm-state :action-goal) (not (equal (send (class ros::action-spec) :name) 'control_msgs::SingleJointPositionAction))) (return-from :action-feedback-cb nil))
(setq current-time (send msg :feedback :error :time_from_start)
finish-time (send (car (last (send (send ros::comm-state :action-goal) :goal :trajectory :points))) :time_from_start))
;; Type: pr2_controllers_msgs/JointTrajectoryActionFeedback does not have :error
(cond ((derivedp msg pr2_controllers_msgs::jointtrajectoryactionfeedback)
(setq current-time (ros::time- (ros::time-now) (send msg :status :goal_id :stamp))))
(t
(setq current-time (send msg :feedback :error :time_from_start))))
(setq finish-time (send (car (last (send (send ros::comm-state :action-goal) :goal :trajectory :points))) :time_from_start))
(when (string= (send (send ros::comm-state :action-goal) :goal_id :id)
(send msg :status :goal_id :id))
(setq time-to-finish (send (ros::time- finish-time current-time) :to-sec)))
Expand Down