Version v1.0.1:

* Improved homing (parallel homing support, better repeatability, better geometric reference point)
 * Improved joint calibration procedure
 * Calibration data can now be stored persistently on the flash memory (no repeated calibration required)
 * Improved logging
 * added PythonAPI to control device easily

New G-Code commands:
 * Enable/Disable motors command, including pose recovery from current position on motor enable
 * Dedicated joint calibration command with save to flash option
 * Set pose command to directly set a target pose for the servo loops, bypassing the motion controller (good for real-time control)
This commit is contained in:
0x23 2025-09-19 09:24:56 +02:00
parent 2cf353e7fc
commit d9888ef369
27 changed files with 1723 additions and 784 deletions

View file

@ -22,16 +22,17 @@ bool MotionController::update(float dt, float* joint_positions, float* joint_vel
// increment time counter
current_time += dt;
// check if end of current path segment exceeded and if so, fetch next one
// check if end of current path segments end time is exceeded and if so, fetch next one
bool queue_empty = false;
float segment_duration = current_path_segment.get_duration();
while(current_time > segment_duration) {
// get next path segment from queue
bool queue_empty = !path_planner->pop_js_path_segment(current_path_segment);
queue_empty = !path_planner->pop_js_path_segment(current_path_segment);
if(queue_empty) {
current_time = segment_duration;
break;
}
// update current time and segment duration
current_time -= segment_duration;
segment_duration = current_path_segment.get_duration();
@ -40,6 +41,13 @@ bool MotionController::update(float dt, float* joint_positions, float* joint_vel
if(!current_path_segment.is_initialized())
return false;
// if queue_empty is true the current path segment is finished AND no more
// pending segments are in the queue. In that case the current path segment
// is disabled for the upcoming iterations. However the current iteration
// will still provide the exact end position to the caller and return true.
if(queue_empty)
current_path_segment.initialized = false;
// evaluate path segment
current_path_segment.evaluate(current_time, joint_positions, joint_velocities);
return true;

View file

@ -30,4 +30,5 @@ class MotionController {
float current_time;
JointSpacePathSegment current_path_segment;
bool current_segment_finished;
};