#robotics Logs

Mar 15 2021

#robotics Calendar

04:14 PM Ubuntivity: Hello
05:50 PM ace4016: hi
05:50 PM ace4016: ah, they left already >_>
06:38 PM tubes4branes: I'm trying to simulate a wheeled mobile robot, its a 3 wheeled mobile robot, where the front wheel is both steered and powered, and the two rear wheels are passive.
06:39 PM tubes4branes: The robot will start out with a known position X,Y, and Theta(orientation); from there I want to change the steering angle, and control it from the wheel speed.
06:40 PM tubes4branes: I've been looking over the Wheeled Mobile Robots book, and looking at the matrices for wheeled mobile robots.
06:41 PM tubes4branes: As I understand it, it has similar control model to a 4 wheeled Ackerman design.
06:41 PM tubes4branes: There is something fundamentally obvious I'm missing.
06:44 PM veverak: it's not easy to simulate if my intuition is correct
06:44 PM veverak: let's say the wheel is at 90 deg angle
06:45 PM veverak: what's the result movement?
06:45 PM veverak: (0 degree -> forward)
06:46 PM tubes4branes: it will pivot about the mid point on the rear axle between the rear wheels and move in a circle of given radius where L is the distance from the mid point on the rear axle, to the front wheel's center position.
06:46 PM veverak: I am not so sure about that :/
06:47 PM tubes4branes: I am.
06:47 PM tubes4branes: one sec, I have a diagram I will post.
06:49 PM tubes4branes: https://imgur.com/htq1lgp
06:49 PM tubes4branes: This is a diagram I made that describes the robot
06:50 PM tubes4branes: btw, here is the book I'm referencing:
06:50 PM tubes4branes: http://hades.mech.northwestern.edu/index.php/Modern_Robotics
06:51 PM tubes4branes: from their wiki:
06:51 PM tubes4branes: http://hades.mech.northwestern.edu/images/2/25/MR-v2.pdf
06:51 PM veverak: ah, I've seen that one
06:51 PM veverak: (not every page though)
06:51 PM tubes4branes: I'm looking at non-holonomic mobile robots, chapter 13.
06:51 PM veverak: yeah
06:51 PM tubes4branes: Geometrically I understand how this 3 wheeled platform moves.
06:52 PM tubes4branes: the rear axle extends to virtual point that intersects the extended axle from the front wheel.
06:53 PM veverak: yeah, this propably makes sense
06:53 PM tubes4branes: the inner rear wheel will move about that virtual point at some speed that is a ratio of the drive wheel circle to that circle, etc…
06:53 PM tubes4branes: I'm using blender as my simulation environment for my robot.
06:54 PM tubes4branes: so I need to solve the position of the robot in X,Y, the rotation of the 3 wheels, and the orientation of the robot in the global reference frame.
06:55 PM tubes4branes: I set up numpy & scipy so I can work with the matrices.
06:55 PM tubes4branes: Generally the system of equations solves for the angular velocity, velocity, and orientation.
06:57 PM tubes4branes: I'm not sure how best to control this in Blender so I can have control inputs that are the steering angle, and velocity, and the control model resolves the position of the robot given the initial set of conditions such as where the robot is in X,Y on the plane, and its orientation. Though geometrically I understand the solutions for these properties, I want to use the matrix differential notation to solve for its position and orientation with respect to
06:59 PM tubes4branes: oddly I don't need to do any complex things like trying to solve in a configuration space for path planning, or solving for maneuverability, I just want to be able to maneuver it as if I was turning motors on and off, and have the simulation represent its movement accurately.
07:00 PM veverak: matrix differential notation?
07:00 PM tubes4branes: In this publication they have the solution for 3 wheeled WMR's, but its in a older form that I don't understand as well mathematically.
07:00 PM veverak: you want to derivate the position formula?
07:00 PM veverak: O_o
07:00 PM * veverak is confused still
07:01 PM tubes4branes: I need robot position & orientation; as well as wheel thetas with respect to t, given a starting velocity at time t.
07:02 PM tubes4branes: Page 305, section A11.5 Neptune:
07:02 PM tubes4branes: of this document:
07:02 PM tubes4branes: https://www.ri.cmu.edu/pub_files/pub3/muir_patrick_1988_1/muir_patrick_1988_1.pdf
07:02 PM tubes4branes: has the coordinate transformation matrices.
07:03 PM tubes4branes: They are using Jacobian matrices
07:04 PM veverak: yeah, the notation is weird
07:05 PM tubes4branes: Modern robotics is using Lie Algebras which I understand better for these things.
07:06 PM tubes4branes: in the simplest case you can think of my robot like a unicycle robot with a offset L from the rear wheels.
07:06 PM tubes4branes: so it really is a simple case.
07:07 PM tubes4branes: or like the 4 wheel car (Akerman steeering), with 1 steered and driven wheel vs. 2. so the last row of terms drops out.
07:07 PM tubes4branes: Things are a bit more complex because my robot is non-holonomic.
07:08 PM tubes4branes: so is a unicycle, the simplest wheeled robot case.
07:08 PM veverak: yeah
07:08 PM veverak: sorry, I was able to do jacobian for FK of robot legs, but can't wrap my head around this
07:08 PM veverak: (but it's 1AM here)
07:09 PM tubes4branes: its okay, I use to be able to do this stuff in my sleep, but can't now :(
07:09 PM tubes4branes: Please get some rest.
07:09 PM veverak: there is still some C++ to whip into submission :)))
07:10 PM tubes4branes: I'm here because I'm missing something very obvious.
07:10 PM tubes4branes: ah.
07:10 PM veverak: I suspect it has to be some extension of rotation matrix?
07:10 PM tubes4branes: The rotation matrices are essentially baked into these systems of equations.
07:11 PM veverak: so, there is this "focus" point, let's call it F
07:11 PM veverak: (axis of rear wheels and front wheel meet)
07:11 PM veverak: relative to the F, the movement should be simple rotation?
07:11 PM tubes4branes: yep, solving two linear equations gives that point.
07:12 PM veverak: so, the real movement
07:12 PM veverak: is about combining rotation around F and change of frame reference?
07:13 PM tubes4branes: which is technically referred to as the ICR(Instantaneous center of Rotation)
07:13 PM veverak: I see
07:13 PM veverak: anyway, if you want to change the frame of reference
07:13 PM tubes4branes: it is true once that point is calculated, I can derive everything else.
07:14 PM veverak: it should be just moving the point to the new frame, doing the transofrmation and moving it back
07:14 PM tubes4branes: yep.
07:14 PM veverak: and finding that point should be basic geometry
07:14 PM veverak: so, just smashing it together should work
07:14 PM tubes4branes: and that can be transformed to the reference(inertial) coordinate system by applying the rotation matrix.
07:14 PM veverak: but it may not be pretty
07:15 PM tubes4branes: which can be done by taking the points from the one system and multiplying them by the rotation matrix.
07:15 PM veverak: yup
07:15 PM veverak: it's actually same as trick for FK/IK for legs of legged robots
07:16 PM veverak: you have to choose the right frame of reference and be able to move betwee them
07:16 PM tubes4branes: I guess I'm trying to understand how to do this using the Pffaian form; and these modern nested Matrices that give you every term in one system of equations.
07:17 PM tubes4branes: Oddly because they anchor to frame of reference I find it really easy to handle robotic arms, and joints, and their kinematics don't depend on previous states, so to truly know where a mobile robot is, you have to integrate through out the course of its movements.
07:18 PM tubes4branes: Though one thing I have is where my robot is at any given time t.
07:18 PM tubes4branes: since its on the grid.
07:21 PM tubes4branes: I hope I don't sound completely ignorant when I'm trying to explain my problem.
07:24 PM veverak: nah
07:24 PM veverak: I feel like the stupid one here, as I study Phd. in robotics :P :)
07:25 PM tubes4branes: Same here, lol, but I had a much better grasp of this stuff 10 years ago, I've forgotten something, or my brain broke with regard to a fundamental understanding that I no longer posess.
07:25 PM veverak: :D
07:25 PM veverak: I switched to different problem set
07:26 PM tubes4branes: I went down the AI rabbit hole for the past 5 years, and I just didn't do any robot kinematics.
07:27 PM tubes4branes: I created a nice model of my robot:
07:27 PM tubes4branes: https://imgur.com/GNOQnqh
07:28 PM veverak: nice :)
07:28 PM veverak: https://schpin.org/robots/koke.html
07:29 PM tubes4branes: Neat, and organized.
07:29 PM tubes4branes: :)
07:30 PM tubes4branes: Your quaternion rotation math is much more advanced, than my simple planar robot.
07:30 PM veverak: still needs a lot of love
07:30 PM veverak: tubes4branes: that's relative
07:30 PM tubes4branes: I think I've over complicated something somewhere.
07:31 PM veverak: we've got good quaternion course
07:31 PM veverak: so I feel... "at home" with them, and find them simple
07:31 PM veverak: so, for me, quaternions seems much simpelr that matrices
07:31 PM tubes4branes: Quaternions are wonderful, I use them in computer graphics a lot.
07:31 PM veverak: yup
07:32 PM veverak: it was computer graphics course
07:32 PM veverak: and I used that knowledge when I derived the FK function of the legs to get IK
07:32 PM veverak: got 'n-DOF' solution, that's nice :)
07:32 PM tubes4branes: I wonder if Blender or FreeCAD implements rotations using quaternions?
07:32 PM veverak: dunno
07:33 PM tubes4branes: I've been really loving modeling in FreeCAD, and animating & rendering in Blender.
07:35 PM veverak: nah, never got a hang of FreeCAD
07:36 PM veverak: so it is in OpenSCAD/haskell mix
07:36 PM veverak: but I ended up writing custom interpret of openscad in haskell :/
07:36 PM tubes4branes: FreeCAD has a OpenSCAD workbench, so you should be able to import those designs.
07:36 PM tubes4branes: That's pretty cool.
07:36 PM tubes4branes: I was using POVRay for most renders, etc...
07:36 PM veverak: eh
07:36 PM veverak: it's bad that it had to be done
07:37 PM veverak: (it extracts BOM, print list from the model)
07:38 PM tubes4branes: That's really nice.
07:39 PM veverak: nice part is that the bom table on the page
07:39 PM veverak: is fully generate from master git of the model
07:39 PM veverak: (the table, and the .stl files it links to too)
07:39 PM tubes4branes: That is super cool.
07:39 PM veverak: yeah, that part yeah :)
07:40 PM veverak: I like to automatize my documentation
07:40 PM tubes4branes: its like doxygen for BOM's :)
07:40 PM veverak: except that doxygen is ugly
07:41 PM veverak: robot is controlled with Lua
07:41 PM veverak: https://schpin.org/control/bindings.html
07:41 PM veverak: bindings doc is also generated
07:41 PM veverak: but this still needs more love
07:42 PM tubes4branes: That is really well done, I need to implement something like that for my robot API, I don't have anything close to that organized, and coherent.
07:45 PM veverak: pro tip: "--help" of app is 'json output' by default
07:45 PM veverak: "--help" just converts the json to something readable
07:45 PM tubes4branes: very cool.
07:45 PM veverak: "--help-json" is the real internal format... which can be easily converted to webpage in documentation :D
07:46 PM veverak: yeah
07:46 PM tubes4branes: here is my robot furniture scene: http://199.38.85.30/povrayArt/Image0009%28adjusted2%29.jpg
07:46 PM veverak: but you would still not be able to build the robot based on this
07:46 PM veverak: so more work
07:47 PM veverak: looks nice
07:47 PM veverak: tubes4branes: you aware of ros.org ?
07:47 PM veverak: it has some native physical simulation capabilities
07:47 PM tubes4branes: yes.
07:47 PM tubes4branes: It can trivially simulate the 3 wheeled robot.
07:48 PM tubes4branes: I'm trying to animate the robot for my animation scene, and simulate control of it for a game engine version.
07:48 PM veverak: I see
07:49 PM tubes4branes: since Blender supports Python natively, I thought I'd just set up the control matrix math in numpy, and be on my way.
07:49 PM tubes4branes: So I decided to see how the modern methods using Lie algeberas kinematically modeled robots, and see if I could implement it, but I still am missing things :(
07:50 PM tubes4branes: The next thing I knew I found myself on here, and deep into robotics texts.
07:51 PM tubes4branes: All my designs are engineered to be built, and exact, they are not created in Blender, but since I'm on a very limited budget, I'm working in virtual spaces.
07:51 PM veverak: yeah
07:52 PM veverak: I can recommend totem, I love the thing
07:52 PM tubes4branes: what is totem?
07:52 PM veverak: https://totemmaker.net/
07:52 PM tubes4branes: That is nifty, I'm usually use to machining parts, that is pretty cool.
07:53 PM veverak: I 3D print most of the stuff
07:53 PM veverak: but got three xl kits of this under the tbale
07:53 PM veverak: as I found it much faster
07:53 PM tubes4branes: I want to open source my designs, but I'm not sure because of their scale and complexity anyone would ever want to build them.
07:54 PM veverak: yeas
07:54 PM veverak: that's one thing
07:54 PM veverak: my robot has the key property "affordable"
07:54 PM veverak: I want to build it in a way that most hobby-level people could build it
07:54 PM veverak: I found this ... limitation ... to the design challenging and fulfilling
07:54 PM veverak: like, I do enjoy doing it solely because of this lately
07:55 PM tubes4branes: I've built some of my pieces over the years, but I would have to have real funding if I"m going to build and have an installation similar to the picture I depicted.
07:56 PM tubes4branes: I thought I'd place it in a VR environment, so people could interact with the pieces, and get a sense of their scale, and the robots would each be controllable in the VR world.
07:56 PM tubes4branes: at least that is the idea.
07:58 PM veverak: sounds like fun
07:59 PM tubes4branes: here is one of the early povray scenes, a lot of things were modeled in POV's scene description language.
07:59 PM tubes4branes: http://199.38.85.30/povrayArt/RoboticWorkbenchAnimationScene024.50%2DWin10%2DrMBP_ADJUSTED.png
08:01 PM veverak: ool ideas
08:02 PM tubes4branes: There is still a ton of work to do.
08:03 PM veverak: tell me about it...
08:04 PM veverak: but!
08:04 PM veverak: I have three bc. students doing something on the project
08:04 PM veverak: maybe ... I won't be alone :)
08:04 PM tubes4branes: That is terrific :)