4 from dwb_msgs.msg
import LocalPlanEvaluation
7 print '\n\n=========================================================\n\n' 8 for heading, i
in zip([
'best trajectory',
'worst trajectory'], [msg.best_index, msg.worst_index]):
9 print '### {}\n'.format(heading)
10 print 'Name | Raw | Scale | Scaled Score' 11 print '---------------------|-----------|---------|-------------' 12 for s
in msg.twists[i].scores:
13 print '{:20} | {:9.4f} | {:7.4f} | {:12.4f}'.format(s.name, s.raw_score, s.scale, s.raw_score * s.scale)
14 print '---------------------------------------- total: {:9.4f}'.format(msg.twists[i].total)
19 rospy.init_node(
'print_dwb_scores', anonymous=
True)
20 rospy.Subscriber(
'move_base_node/DWBLocalPlanner/evaluation', LocalPlanEvaluation, eval_cb)
21 rospy.loginfo(
'print_dwb_scores ready.')
25 if __name__ ==
'__main__':