Local and trajectory-based indexes for task-related energetic performance optimization of robotic manipulators