These two concepts are complementary and you use them together, the motion profile providing the input to your control scheme. At each time-step the motion profile gives you the reference values for the control loop scheme (and also some feed forward values if needed).
This goes both for the acceleration and the deceleration phases. in both cases, the motion ...
To understand this concept, you can compare two famous algorithms, Probabilistic Roadmap (PRM) and RRT.
RRT is a single query algorithm. In other words, it can evaluate a single path when two points are selected, i.e., the path between start and goal point. RRT forms a tree-like structure that branches out in all directions sampling and connecting the points(...
Based on your comment:
if I am able to get 0 to 2pi, would be enough as well.
The following code will do it:
modifiedHeading = SensorOutput();
if(modifiedHeading < 0)
modifiedHeading += 360f;
But, as I've mentioned previously, you still have the jump discontinuity, but you've moved it from the 359/1 degree range from the 179/-179 degree range.
Here is the minimalistic implementation of RRT for ROS in C++.
You should have ROS (latest version) installed on your system
Use Linux OS to install ROS
Link to the repo:- https://github.com/Safire-AI/RRT