AXIS_ERROR_MIN_ENDSTOP_PRESSED prevents startup

Hi, I have ODrive v3.6-56V with fw 0.5.6. However, ‘start-up’ of the motor is prevented by the endstop being activated. ( After turning off the rig, the rig drops down (because of gravity) and then activates the min-endstop). Is there a way to ignore the endstop on start-up?
For example, can I omit the end-stop and start (from the starting point) with an offset as ‘normal’ in the homing sequence? This, so that the zero point of the actuator is just above the physical start of the axis. In other words, a normal homing startup but without looking for the end-stop and ‘just’ starting (by looking for the encoder’s index) from the point where the actuator is currently. And start from there.

Hi! Sorry for the delay in my reply.

Sounds like you should probably just disable the endstop on startup, then re-enable it when you want to actually home to the min endstop? Is there another reason this wouldn’t work?

Sorry for my late response and the suggestion but I don’t know how to do: ‘…just disable the endstop on startup, then re-enable it when you want to actually home to the min endstop…’.

I have now ‘disabled’ the endstop (odrv0.axis0.min_endstop.config.enabled = False) as well as homing (odrv0.axis0.config.startup_homing = False). Index-search is ‘on’ (odrv0.axis0.config.startup_encoder_index_search = True).
Now if the rig is turned off (or causes an error), it falls back to the ground, due to gravity. The actuators go to their physical starting point. On restart, the actuators search the index (the right way = away from the physical starting point) and start from there (input_pos = 0). (They obviously ignore the end stop)
What I don’t have yet is an offset (as with odrv0.axis0.min_endstop.config.offset) but at least now I don’t have to manually lift my rig slightly (past the endstops) every time to be able to (re)start.

Hello, I know this came up a while ago but as I am also setting up a 6DOF rig with odrive I came across the same issue. It is a simple code change in firmware.

In MotorControl/axis.cpp change

if (min_endstop_.config_.enabled && min_endstop_.rose() && !(current_state_ == AXIS_STATE_HOMING)) {

to

if (min_endstop_.config_.enabled && min_endstop_.rose() && !(current_state_ == AXIS_STATE_HOMING) && homing_.is_homed)

I just did that and from my initial tests looks good (endstop works after homing sequence and offset from endstop is complete) however this is fresh from 5 mins ago so I may have missed something.

Hi Alex,

That’s very thoughtful of you to let me know that you’ve found a solution. I’ll take a look at it (I’ve implemented a temporary solution for now).

I’m curious to hear about your progress with your own 6DOF. In any case, good luck. Where I live now, it’s wet and cold, so I’ve been flying to faraway places in nicer weather for a few days now (in my 6DOF sim, of course :-), which is working fine).

Regards, Eric

No worries, I am taking so much info from others that it is the least I can do to contribute. Also I have implemented lower and upper soft limit on the v0.5.6 latest 3.6 firmware version the same way the custom old firmware used to work. I can share the firmware binary and modified code if you want (but it implies using FlyPT in Turn mode, I am testing with 3.7).

I will create a new topic on xsimulator.net for my Odrive 6DOF; I am using SilentChill and Peacemakers design as a baseline; it will be all CNC parts as that’s my job :slight_smile:

I have used a well known software to simulate the cinematics of the design and find collisions.

Cheers,

Alexis