Giter VIP home page Giter VIP logo

Comments (5)

ericjunkins avatar ericjunkins commented on August 20, 2024

I remember there being some case where it seemed like a good idea to have it, but am trying to remember the exact case. I think it was something similar, but to the effect of if the controller lost connection while you were moving the joy stick, which can happen if you are a bit far away from it, joy wouldn't fire a new command. The case here that happens is:

Someone is telling the robot to drive forward, it starts getting to the limit of the controller, they tell it to stop going forward but that packet is dropped. We wanted it to repeat the values it's at next to have it stop driving or drive backwards etc.

from osr-rover-code.

Achllle avatar Achllle commented on August 20, 2024

What you want instead is that the controller stops the wheels whenever it doesn't get a command (a heartbeat) for a certain period of time. The joystick node only has to send commands when there are commands to be sent. When a command doesn't make it, no big deal, the Rover stops moving. But at least it's not driving full speed into an obstacle

from osr-rover-code.

ericjunkins avatar ericjunkins commented on August 20, 2024

But that's only true if you are sending new updated signals every heartbeat timeperiod right? For instance, if you were to command the robot to move forward at full speed and just left it there, without moving the joystick it would timeout on the heartbeat because it didn't get a new command correct?

from osr-rover-code.

Achllle avatar Achllle commented on August 20, 2024

I was (partially*) incorrectly assuming that joy node didn't recognize that the controller has been disconnected and keeps publishing the last command instead of just publishing defaults. Instead I was running into the bug that I described where a network disconnection magically freezes up the driver (tbd).

(*) joy node wontfix for different behavior of autorepeat for different controllers.

We have to be careful with this setting. A safer approach would be to force autorepeat yourselves by repeatedly pushing a random button or slightly moving the joystick while driving.
In any case, the roboclaw_wrapper should probably still have an auto-turnoff when no commands are received for a certain time. A joystick won't always be the only node sending commands (e.g. autonomous mode or different publisher), could crash or shut down by accident and so the rover could still crash in that case. That's a somewhat separate issue though. Closing this for now.

from osr-rover-code.

ericjunkins avatar ericjunkins commented on August 20, 2024

I agree on your point here. Can think about that moving forward 👍

from osr-rover-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.