Skip to content

Usage of moveTimed - Still unable to get it dialed :( #363

@RoboCrafty

Description

@RoboCrafty

Hey mate!
Link to my code
First of all, I’d really like to thank you for making this library for the ESP32. It’s honestly really powerful, especially considering how well it makes use of the hardware.

I’ve been trying to implement synchronized motion for my 6-DOF robot arm. Right now, I’m only testing with a single stepper because I’m already running into issues even with that setup.

I’m bypassing the internal ramp generator because I want to use my own trajectory generation with Ruckig for 2 reasons, 1- I want s-curve as opposed to the default trapezoidal motion profile and 2- I need to move six motors synchronized in order for the robot to follow a certain trajectory in the cartesian space. My current approach is to generate trajectories externally with ruckig on core1 (in the main loop), fill a queue with 10 ms worth of motion data, and then have a separate loop running on another core that feeds the stepper using moveTimed() at 1000 Hz.

The problem is that the resulting motion is not smooth at all, and overall I feel like the architecture around these sections isn’t very robust yet. The code is definitely messy right now, but specifically I’d really appreciate feedback on the loop() function and the feeder function.

From my understanding, the important thing is making sure the queue never runs dry. I try to guarantee that by generating 10 trajectory points ahead while only executing 1 ms worth of motion at a time.

Eventually, I want to extend this to all six steppers. The idea is somewhat shown in the test4() function (although it’s incorrect right now as it isnt using the feeder architecture I made today). My goal is basically to time-parameterize the IK output and then feed synchronized motion commands to all six motors through moveTimed().

I’d really appreciate it if you could take a look and tell me what I’m doing wrong, or if there’s a better way I should be architecting this kind of system.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions