b-it-bots / mas_domestic_robotics

Robot-independent ROS packages for domestic applications
GNU General Public License v3.0
28 stars 45 forks source link

DMP online execution fix #252

Closed alex-mitrevski closed 3 years ago

alex-mitrevski commented 3 years ago

Problem description

The existing implementation of the online execution was unrolling the DMP (i.e. calling the dmp.step function) at every step of the control loop, without checking if the intermediate goal has been reached. For this reason, the robot was very quickly just starting to move directly towards the goal, thus not following the trajectory at all.

The issue was first noticed during the development for https://github.com/b-it-bots/mas_domestic_robotics/pull/246, but directly reported by @sthoduka, who noticed that the robot was just moving in a straight line towards the goal rather than according to the primitive.

Summary of changes

In the fixed version, a DMP step is only taken if the currently pursued goal has been reached, which means that the trajectory is actually followed.

Tests to verify the changes

cc @AhmedFaisal95

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication