Robotic doggo! Quadruped Robot

Discussion in 'Hobby Engineering' started by ShadowBurger, Apr 12, 2021.

  1. ShadowBurger

    ShadowBurger Member

    Joined:
    Feb 19, 2008
    Messages:
    2,313
    Location:
    Melbourne
    Edit: turned the thread into a build log I guess

    --

    Hey folks

    Anyone here have any experience at all with ROS? That's Robot Operating System for anyone curious

    Just looking for someone to explain to me at a really high level how the environment would hang together, in terms of what hardware I might use on my quadruped robot, and what I should begin to look at learning so I can put together the control system for it. I have cpp, python, plenty of Arduino, and other relevant dev experience

    Cheers
    Shads
     
    Last edited: Apr 30, 2021
    Agg and whatdoesthisdo like this.
  2. theSeekerr

    theSeekerr Member

    Joined:
    Jan 19, 2010
    Messages:
    3,614
    Location:
    Broadview SA
    I did ROS bringup on a wheeled robot as a uni project nearly 10 years back now, so.... yes, but rusty as heck?

    For a high-level intro, and discussion of some odometry hardware appropriate to a quadruped robot, there's some good stuff in this playlist on James Bruton's YouTube channel:
     
    ShadowBurger likes this.
  3. bYrd

    bYrd Member

    Joined:
    Sep 14, 2001
    Messages:
    2,215
    Location:
    NE Melbourne
    It's not a patch on ROS, but if you want to look into an easier to program robot, I bought an EZ robot controller a few years ago which I've enjoyed tinkering with:

    https://www.ez-robot.com/
     
  4. OP
    OP
    ShadowBurger

    ShadowBurger Member

    Joined:
    Feb 19, 2008
    Messages:
    2,313
    Location:
    Melbourne
    thanks mate

    I still have yet to form a picture in my mind of how a ROS environment hangs together. It would be great to know if I have read the situation wrong; essentially I was hoping that ROS would offer me a customisable tool to control the complex movements of a robot with multiple limbs with multiple DoF without me having to code it from scratch.... but that doesn't seem to be what ROS is. Every guide I read is so vague as to what they are actually teaching you - eg. at what point does ROS interface with a real physical robot? Not one single official tutorial goes into that. (https://docs.ros.org/en/foxy/Tutorials.html#tutorials) The video you've linked really skims over it: "here is ROS! it runs on a rpi. Oh, and I wrote a quick script with an arduino to control the servos." Then nothing further on that subject. From reading it seems like I need to write an arduino script to function as a network-attached ROS node and use feedback from a simulator to control servos and do the PID and inverse kinematics to control movement, but then given that I only want to control this guy with an R/C controller I find myself asking why I even need ROS at all... I thought the whole idea was to avoid reinventing the wheel. I hope that makes sense? I'm sure I'm missing pieces of the puzzle so it would be great to have that cleared up.

    I don't have a spare PC and don't want to install a VM so for now I can't do much experimenting until my OrangePi arrives

    In other news, the physical build is progressing at least

    [​IMG]
     
    Last edited: Apr 22, 2021
    elvis likes this.
  5. theSeekerr

    theSeekerr Member

    Joined:
    Jan 19, 2010
    Messages:
    3,614
    Location:
    Broadview SA
    ROS itself is quite abstract, dealing with stuff like device drivers and message passing between publisher nodes and subscriber nodes on a distributed network.

    A lot of it isn't really applicable to a robot that you drive around - the wheels that it avoids re-inventing are stuff like:
    • Device drivers for laser rangefinders
    • Input device abstraction (joysticks etc)
    • Simultaneous Location and Mapping
    • Navigation and path planning
    • Visualisation of robot pose and sensor data
    In general it's a tool that will be more useful for a robot with some degree of programmability and autonomy.

    Some ROS packages implement functionality that might be useful to you - in particular I'd direct to you to the MoveIt framework for motion planning and inverse kinematics, and ROS_Control for handling controller inputs.
    But unless a package implementing your particular robot already exists, at some point you'll have to write the node that accepts a speed/direction/joint angle and turns that into motor movements, and you're basically on your own at that point.

    (Regarding the videos I linked: I intended to link the playlist, not that particular intro video. Sorry, I don't have time to find where in them the useful stuff is either)
     
    ShadowBurger likes this.
  6. OP
    OP
    ShadowBurger

    ShadowBurger Member

    Joined:
    Feb 19, 2008
    Messages:
    2,313
    Location:
    Melbourne
    Thanks heaps. That's basically where I was at. I guess I learn more when I get started with the OrangePi :)
     
  7. OP
    OP
    ShadowBurger

    ShadowBurger Member

    Joined:
    Feb 19, 2008
    Messages:
    2,313
    Location:
    Melbourne
    Seem to have good control over the servos with an ESP32 coupled to a PCA9685 16-channel PWM board. All my own code on the ESP thus far

    Have yet to write a ROS node on it to receive angle and velocity commands

     
    elvis likes this.
  8. OP
    OP
    ShadowBurger

    ShadowBurger Member

    Joined:
    Feb 19, 2008
    Messages:
    2,313
    Location:
    Melbourne
    lolll

    They're just poses triggered by Dragon Naturally Speaking... but still, works!



    At the moment I'm struggling with the math to take a coordinate relative to the 'shoulder' and turn that into angles for the two leg joints. When I googled what a 'radians' was I had to stifle a few choice words for the people who decided it would be the standard of measurement for angles in computers
     
    elvis and whatdoesthisdo like this.
  9. whatdoesthisdo

    whatdoesthisdo Member

    Joined:
    Jan 19, 2011
    Messages:
    9,754
    Location:
    Gold Coast
    been watching since you launched this thread and while I can't offer any help or suggestions, I am super interested in your progress. really cool project.
     
    ShadowBurger likes this.
  10. theSeekerr

    theSeekerr Member

    Joined:
    Jan 19, 2010
    Messages:
    3,614
    Location:
    Broadview SA
    Have you never studied trig? Trig falls out totally naturally in radians, it's bullshit conversions everywhere in degrees.
     
  11. OP
    OP
    ShadowBurger

    ShadowBurger Member

    Joined:
    Feb 19, 2008
    Messages:
    2,313
    Location:
    Melbourne
    yeah back in high school! i'm 30 and haven't used it since :wired::lol:

    I get their practicality if you're writing math a lot just in general as a concept to wrap your brain around it's tricky and I just wanted to moan about it. It's all good, I got there in the end!
     
  12. mtma

    mtma Member

    Joined:
    Aug 12, 2009
    Messages:
    5,807
    You'll get used to it. Also there's few situations where you will use it directly in an accurate manner, really just for setups and stuff. Anything else it's just knowing that 3 is almost half way and 6 is almost the way around.

    When doing anything by hand, keep it in terms of pi until you actually need the numeric value. This way 180 is pi and 360 deg is 2pi, and the intrinsic contributions to whatever the angle is is more apparent. Also in general with algebraic operations, you will manipulate it easiest this way and quite often you won't even need to know the value without pi attached.
     

Share This Page

Advertisement: