Embedded - 393: Don’t Drive My Baby Off the Table
Episode Date: November 19, 2021Professor Carlotta Berry from Rose-Hulman Institute of Technology joined us to talk about robotics, PID tuning, engineering education, ethics, her book, and standing up in front of a classroom. Carlot...ta’s book is Mobile Robotics for Multidisciplinary Study (Synthesis Lectures on Control and Mechatronics). She has a page at Rose-Hulman as well as a personal blog and a consulting site (NoireSTEMinist.com). She is an advocate for BlackInRobotics.org. On Twitter, Carlotta Berry has a personal account (@DrCarlottaBerry) and a professional account (@NoireSTEMinist). She is also the @BlackInRobotics coordinator. An explanation of Zeigler-Nichols PID tuning with pros and cons.
Transcript
Discussion (0)
Welcome to Embedded. I am Alicia White alongside Christopher White. Our guest this week is
Professor Carlotta Berry and we're going to talk about mechatronics.
Such a great word. Hi Carlotta, welcome.
Hi, thanks for having me.
Could you tell us about yourself as if it was the first day of school and
you were introducing yourself in a class? Absolutely. I teach college, so I will assume
that is the age range we're considering. I am Carlotta Berry and I'm a professor of electrical
and computer engineering as well as robotics at Rose-Hulman. Because I teach robotics,
I actually am more than just an
electrical and computer engineering professor. I also teach students in computer science,
software engineering, mechanical engineering, as well as electrical and computer engineering,
and also biomedical engineers. One of the greatest things about robotics is that it's
multidisciplinary. So it's a great way for showing connections between disciplines. Cool.
I have a few lightning round questions where we ask you short questions and we want short answers.
And if we're behaving ourselves, we won't say why and how.
And can you give us a whole lecture on that?
Okay.
Favorite fictional robot?
I think I'm going to say WALL-E.
What's your favorite closed-loop control mechanism?
PID, state space, fuzzy logic, something else?
PD.
Which is more fun, mecha or tronics?
Tronics.
Is there a particular microcontroller you use in your courses?
Arduino Mega. What's your favorite microcontroller you use in your courses? Arduino Mega.
What's your favorite microcontroller board when working with kits?
Arduino Uno SparkFun Redboard.
Do you have a tip everyone should know?
Robots are cool.
I don't think that's much of a secret at all. You teach at Rose-Hulman Institute of Technology, which is an odd sort of school coming from someone who went to Harvey Mudd. Could you describe Rose-Hulman?
Oh, I didn't know we had a Harvey Mudd alum on the line. Rose-Hulman likes to think of Harvey Mudd as their primary competitor.
So Rose Homan is a small undergraduate engineering school in Terre Haute, Indiana,
which a lot of people have never heard of. It's only famous because of Indiana State and Larry
Bird attended Indiana State and also because the federal penitentiary is in Terre Haute.
And we're unique because our highest degree is a master's and we have actually
very few master's degrees. Most of them are course-based. So we really focus on student-centered
teaching and learning. I like to say as a student who went to Georgia Tech that Rose Harmon is very
similar to Georgia Tech, except all of the courses are taught by the professors, not by teaching
assistants. And the professors actually hold office hours and engage with the students.
I mean, that sounds like college to us.
It sounds very similar to mine.
Does Rose Holman still use the Rube Goldberg cartoons as the recruiting brochures?
They actually do not.
They don't really use ski tarahote either.
And it's so funny because that is the second time I've been asked about the Rube Goldberg cartoons in the past two weeks.
It sounds like they probably need to bring them back.
We had someone who said that that was a favorite in the high school they went to.
Yeah, we hear that one is ski Terre Haute are extremely popular or were back in, I guess, the 80s and 90s because that was the running joke is you couldn't ski in Terre Haute.
But there you go.
There's also some with Legos that we've heard were very popular where some students said, oh, this is the place for me.
They actually put Legos on the brochure.
Okay, so work-wise, how is mechatronics different from robotics?
So uniquely in our robotics minor, we have both.
I teach robotics and my colleague teaches mechatronics.
Robotics has more of a focus on controls as well as the actual robot and how to design controllers or a control architecture for the robot.
Whereas mechatronics focuses more on the microcontroller and creating projects and
systems that integrate science, planning, and acting, which we know are also part of a robotics
control architecture. So I would like to say mechatronics is everything you would need
except the robot, right? So you can actually look at just designing a system that makes decisions
based upon a sensor perception to act upon the world where that acting on the world may not involve grippers, may not involve wheels
on a mobile robot, but you're still just looking at that integration of electronics, mechanical
devices, hardware, software, et cetera. How do you define a robot? Does it have to be something that
moves on its own? No. I've gone back and
forth with colleagues about this, and I think they've now won me over to their side. You can
have a completely remote-controlled robot, and it'd still be called a robot. I used to call it
a radio-controlled car. And I think the difference is that if you're controlling it remotely,
but it is still able to do at least something on its own, it could be considered a
robot. For example, a radio control car, you may push the buttons, it drives, you don't push
anything on your controller, it stops. But maybe there are buttons on a remote control to switch
the robot into obstacle avoidance or wall following or heat seeking, et cetera. So you can
have a fully remote control robot as long as it has even a minimal level of intelligence.
Okay. And so the mechatronics also has intelligence or less?
They do. They do. It just won't have a robot, right?
Mechatronics, you know, it's funny because this is also another kind of dicey slope that you're skating on here.
There's a debate about what came first,
the chicken or the egg, mechatronics or robotics, and what's the difference.
So the way that I distinguished the two is that robotics is mechatronics with a robot,
if that makes sense.
So you can have it.
Well, I think maybe mechatronics are subsystems, maybe.
Is that a way to put it?
Yes, that could be a way to think about it.
Yes. So the mechatronics would subsystems, maybe. Is that a way to put it? Yes, that could be a way to think about it. Yes. So the mechatronics would have a microcontroller,
it would have sensors, it would have software so that it could have a plan to act on something.
The way it does that does not have to involve a robot, though. So let me give you an example.
A mechatronics project or a student in a mechatronics class could make a pinball machine,
right? A pinball machine does not have a robot, but it would have all the qualities and features
for a mechatronic system, including something to sense when the ball is released,
something to make the system act a certain way if the ball hits some of the little
rings inside of the pinball machine. So a mechatronic system still has sensing,
planning, and acting, but it's
not a robot. Does that make sense? Yes, that makes sense now. Okay. So mechatronics is robotics
without actuation. And this is just my opinion. I know somebody would disagree with me because
like I said, in our field, this is one of those things that people debate. Oh yeah. Robot or not,
it's a question. Yes, absolutely.
You wrote a book, Mobile Robotics for a Multidisciplinary Study.
Yes.
I guess asking you what that's about is kind of redundant?
No, you can ask.
Because the title's pretty explanatory. But yes, what is this book about? I think if I give you my motivation, it tells you what the book is about. So because robotics is exciting for people from nine to 99,
you can find content about robotics everywhere, YouTube videos, TikTok, you name it.
So the challenge I had when I started teaching robotics is I could not find a textbook for my
students at the appropriate level. I could find K through 12 books on robotics,
like on Legos, first Lego League, first robotics,
VEX, Botball, but that was too juvenile for my students.
I could find graduate level textbooks on robotics,
such as by Maya Matarik, Robin Murphy,
some of the rock stars in the field,
but that's graduate level robotics.
Those are the books I read for my PhD. I could not find much that fell in the middle. It was
either too easy or too hard. It's kind of like Goldilocks in the bed. So that's why I created
the book because I really needed a textbook for my students. So I took my course notes
that I had cobbled together from many years of using five different textbooks and created a textbook that was not tied to any certain software, any certain hardware,
or any certain discipline. So it's a book that basically touches on robotics at a high level
so that people from different walks of life can understand it. Yes, I like that. I like the not
tied to anything.
It's kind of strange, but that's exactly what my motivation was.
I wrote a book about making embedded systems and several times was questioned quite specifically from my editor about what you mean you're not going to have an example platform. And I'm like, all the platforms are example platforms.
Yeah. But you do talk about hardware in the book. Is this in general like controllers and sensors
and actuators? Absolutely. I do. And I talk about it in such a way that whether you choose to do it
on your Arduino Uno that you got from Amazon, or you choose to do it on your $5,000
Kiva robot or whatever it is, it would still work, right? So because my students come from
different disciplines, some of them know more about controls than others. Some know more about
embedded systems or mechatronics than others. I discuss everything from that standpoint of,
I will meet you where you are. One of the other challenges I
have is that my computer science and software engineering students know more programming than,
let's say, my mechanical engineering students. So I could not tie things to a certain software
or hardware because my students don't have the same prerequisite skills. So that's not done in
the book. I do that in class. I do that by putting them on teams with people from other disciplines and by telling them, if MATLAB is your jam, make it work in MATLAB. If Python is what you
like, make it work in Python. So that's why I keep everything general because I don't want my robotics
class to devolve into a teaching programming and hardware class. So how do you talk about sensors without having to talk about their cost and their interfacing to controllers?
So what I do is they all have the same robot platform.
That's where our consistency comes in.
And I've also changed robot platforms about five or six times, just like I changed textbooks five or six times.
So now we have a modified robot that had a different controller
that now has an Arduino Uno on it.
I'm sorry, Arduino Mega on it.
So I do talk to them in general terms
about you have to use analog read
to read infrared or sonar.
You have to use pulse width modulation
to do analog write.
So at that level, we do have those discussions.
But then once they get it into
the software level, because like MATLAB has an Arduino wrapper, or there's a way to talk to
Arduino through Python, as long as the students want to figure that out and they're more comfortable
with that other language, they can use it. But on that specific level, I do tell them,
these are analog devices. These are digital devices. These you have to write to, you have
to read to.
But then at that point that they do that, as long as they can get it to work, I'm happy.
So to some extent, read the data sheet.
Yeah. Yeah. Students don't always like to do that though, but yeah.
You mentioned you've switched robot platforms a bunch. Is that due to
things becoming out of date or new things coming
along or costs or actually none of the above it was it was finding a way to teach students robotics
at a level that i was comfortable with when i first started i used a pic
microcontroller and we used like mp lab to program it And what I found that first year, 2007 is the first year I taught robotics,
is we spent more time bit twiddling
and figuring out what bits had to be on,
what bits had to be off,
tryst A, tryst B.
And the students were constantly getting confused
that by the end of that quarter,
we had just gotten the robot to read sensors
and be able to stop at an obstacle.
And I was like, this is not
what I want my class to be. I don't want to be down here in this level of minutia. I want to
talk from a high level perspective of how to build a control architecture. So I changed robots so I
could change microcontrollers. So then I changed to a different microcontroller that you could
actually program in Visual Basic or no, Visual C Plus at the time.
It didn't work for some of the other students because they didn't know that. The ME students
only had mechatronics and knew the PIC stuff. They didn't know that. And I got tired of chasing that.
So that's why I finally just picked a robot I liked, pulled the Atmel microcontroller off of
it, put Arduino on there, and that's what we use. The other benefit of doing that is Arduino is a hobbyist or a maker platform. So if I'm not
right beside them, they have the little Google machine at their fingertips and they can Google
how to read a temperature sensor in Arduino and get 50 links in five seconds. So I told them,
this is why we're changing to Arduino, because it is a maker.
And Rose Holman, one of the quotes we have is, it's where thinkers and tinkerers come to thrive.
Therefore, I am not the only imparter of knowledge in this classroom.
If you're in here with me, you are learning on the journey with me.
I have so many examples of students teaching me how to do things with technology as much as I've taught them. By
getting something that they could now universally search online, that opened their minds up to be
able to be independent researchers and read the data sheet. When it was something that was very
impossible or difficult for them to understand, they couldn't do that. Arduino opened that up
for us. I sound like a commercial. They should pay me. Arduino, it's so easy to sound like a
commercial. I mean, it's just amazing that they took this really complicated thing and they made
it friendly. Absolutely. I now do workshops for middle school kids in Arduino where they're able
to get it because we started in Tinkercad. Tinkercad now has all of the Arduino example programs in there. So I can
show them on the computer, walk them through the hardware, walk them through the software,
and then take it offline and show them how to do it by hand. Couldn't be any easier.
Neat. I hadn't seen that.
Yeah. I have videos on that, by the way, on my website, if you want to see.
There is some backlash in industry against arduino though she says being
the major source of the backlash um because it isn't necessarily a professional platform
do you how would you respond to that so interestingly enough, I have a colleague who teaches embedded systems,
which is the ECE. So it's mechatronics in mechanical engineering. It's embedded systems
in electrical engineering. And sometimes robotics minor students will take both and then say one is
an EZA because once you've taken one or the other, you pretty much know everything. My colleague in
embedded systems taught freshman design with us one year. We use Arduino UNO's in freshman design on either a parallax bobot or on a TI launchpad robot.
He did not like the class because he felt like we were teaching the students bad habits.
And he felt like we were teaching them bad habits because when you use SparkFun Inventors Sample Code, it is not commented and organized the way you would
want somebody in embedded systems to do so. Well, me being an electrical engineer,
I don't know the proper way to do embedded systems coding. But what I do know is that we
were able to get some first quarter freshmen programming robots, some of who had never
programmed before in their life, and get them excited about their major. A freshman year in
engineering is typically chemistry,
calculus, physics, English, you name it. And the students change majors and go, I don't like any
of this. This is not what I thought this was. Well, this is not your major. This is the foundation
for your major. So we've now pushed down some of that technical content into the first quarter of
the freshman year to get them their minds on and hands on excited about their major.
And we could not do that if it were not for things like SparkFun and Arduino, right?
Because yeah, you're right.
Maybe I'm not teaching them the textbook formal way for doing embedded systems, but I think
they would have gotten so lost in the bit twiddling and the what's the proper way to
do this, that,
and the other that they would lose out on those little bits of success that I needed them to have to want to stay in our major because they look at physics and calculus and go, I hate this.
I don't want to be an engineer. Can we be best friends? Yeah. Oh, thank you. Yeah. I think
physics and calculus are important. Please don't hear me wrong, but I think you sometimes got to
backdoor them into physics and calculus. I will tell them, make the robot drive, no encoder,
no feedback. Why didn't it stop at 12 inches? Let's talk about odometry error. Let's talk about
wheel slippage. So you can still get that theory in there, but do it once they care.
No, that's a great, that's just, yeah, that's the way. I have no comments. I feel like either the chorus or that I have given exactly what you said
as part of some other podcast or talk or something.
Because, I mean, you're entirely right.
We start with bit twiddling, which is super fun once you're good at it.
No.
But why would you start there?
No, it's not.
I've made so many mistakes bit whittling
in the last two weeks that I...
Why don't you bring it to me?
You know how much I enjoy it.
Well, this is what we've done now.
So we changed our freshman design class
so that it uses the TI MSP 430,
which they need for their microcontrollers course.
And they did this because the professor
that taught microcontrollers was like,
they're drowning when they get to me.
So now, although the programming platform is called Energia,
it looks very similar to Arduino, Sketch IDE,
they're now getting some success in the MSP430
so that now when they get to microcontrollers
and they start the bit tooling and all that,
you can now say you have a scaffold. I can scaffold your knowledge on what you did in
that other class. So now hopefully you have a little bit more meaning and maybe you don't
make as many twiddle mistakes because you now understand a little bit more, right? About how
this thing works and what it does when it's successful. And because they have seen other ways to put together the bit twiddling, the robots are too expensive for the undergrads to touch. So we're going to let you guys write your software. But then the day
when you were ready to do your project, you're going to stand behind a glass shield and the grad
student will upload your code and we'll see if it works correctly. Excuse me. That's awful.
Squeeze me. Right. I was like, what kind of robotics class doesn't let the students touch
the robot? So that was another reason why I designed my courses in Arduino and things like that,
because they take the robot home.
It's their robot baby.
That's what I tell them.
Don't drive my baby off the table.
And you keep it for the quarter so that you can tinker.
I don't want you to break it because we don't have a money tree over here.
But some real learning happens by being able to go, what happens if I flip the switch?
What happens if the battery runs low? And I did a pure odometry program and now nothing works correctly anymore? Well,
the power changed. Think about that. This is another thing I do with the computer science
and software engineering students. Stop writing these big, huge programs to do this stuff that
I'm asking you to do. The microcontroller is not going to fit that, right? So those kinds of things
you don't see in simulation,
because I know some people teach robotics
purely in simulation.
And some of those things you can appreciate
if you never got to touch the robot.
Sorry, I'm preaching.
No, this is fantastic.
Great.
But you mentioned simulation.
And one of the ways I got connected to you
was a discussion about robot operating system, ROS.
Yes, yes. Do you use it much? I got the idea you didn't discussion about robot operating system, ROS. Yes.
Do you use it much?
I got the idea you didn't really.
You got the idea right.
So let me tell you my history with ROS.
I'm an electrical engineer by training.
I was never formally trained in software, really hardly at all.
So I learned software as needed, which means I'm a trial and error boot, you know, you know, seat of my pants kind of coder. So when my students wanted to do ROS, I was like, well, let's do ROS. I doing a sneak attack so I could learn it.
So we did multiple virtual ROS robotics workshops over the summer online. And I was the facilitator.
I still only know about 50% ROS. I'm not going to lie. But this is what I have now done to make
myself learn ROS. I've partnered with Hadabot, which is a company that has made a low-cost ROS
enabled robot to offer an advanced robotics course that uses ROS, which is a company that has made a low-cost ROS-enabled robot to offer an advanced robotics course that uses ROS,
which is going to force me to learn ROS by March.
So if I come back again, hopefully after March, I will know ROS.
I like ROS, but it's not for everybody.
It has a really great simulation system.
I mean, if you were in a position where you cannot touch the robot because it is too expensive,
Ross does give students the ability to learn kinematics and movement through odometry.
And what those things mean without doing it just theoretically, at least there's a simulator.
And if you do the simulator right,
your robot can totally fall apart, which is hilarious. I've also recently learned,
a lot of companies reached out to me through our social media engagement, that there is a
Ross rapper from MATLAB. MATLAB is really popular among EE and ME students. So I think that would be
another way to get them introduced to that because my PhD was actually on human-robot interaction and human-robot interfaces.
So one thing I would love to see someday is the simulator and a human-robot interface that talks
to the real robot where you compare, right? Where maybe you design your algorithms in the simulator
first, because of course my students do the trial and error coding that I'm so proud of,
but I don't want them to do. But if they could have a simulator where they have to create an
algorithm or a software plan or flow chart or state diagram first, you show me it's working
in the simulator with all of your modeled sensors, odometer, et cetera. And then we put the robot on
the floor and see how well reality matches to mathematical modeling. I would love to do that
someday. I did. I did this little arm robot. It was a super cheap $50 arm robot. And I wanted to
see if good software could make up for bad mechanics. Right. And I actually got it modeled in Gazebo in ROS, and it was all working.
And I could show where a kinematic move would do this, and a direct line move would do that.
And it was really cool, except one of my linkages was wrong in the ROS robot description file.
So at some point through the video where I was taking it,
this works, this works, this works,
at some point it just goes nuts
because that's not how the shoulder joint really worked.
And so it would move,
and then it wouldn't know how to move to the next bit
because that was a blank space that didn't exist in the robot world.
Yes, that it was such a fun dichotomy of using ROS and understanding the limitations. I mean,
that's a limitation of my ability to write those URDF files, but still.
That's exactly what I want to do with my students. And that may not happen. That's why I'm designing
an advanced robotics course. I think at the introductory level, that's a bit much. I think Ross in the
introductory level is also a bit much, but I would like to get it out of the graduate student realm
and into undergrads, which would be appropriate for Rose Holman, because we do have a lot of
robotics minor students who go on to graduate school at Carnegie Mellon, Georgia Tech, Stanford,
et cetera. So if I can get them a leg up
by giving them at least a basic introduction to ROS before they leave undergrad, that puts them a
little bit ahead in grad school, in my opinion anyway. But also having to show that comparison
because also a lot of our students learn how to design a controller in MATLAB and it's completely
occluded what they understand about control systems so that
they have no connection between that and what they do on the robot. And by having that software
connection, I can also make closer ties because right now, if I say design a PD controller to do
wall following on the robot, they're completely lost. They can't tie it back to any of the theory
they learn in their controls course where all their labs were in MATLAB.
It's really hard because you learn the PD controller and you learn how to solve for the, you do the Bode plots and the Zeigler-Nichols thing.
And the Laplace transforms.
And you do all that.
And then you get a robot and you know where you want it to go.
Where do I put the Bode plot on the robot?
Exactly.
Right, right.
And instead you're like- No And that's what they asked.
That's exactly. They're like, well, what's the transfer function? I don't know. Well, I don't
know. I don't have a model for the motors. I don't have a model for the sensors. Well, how do I do
it? I said, and to be honest, I do do the Ziegler nickels. I say at a very basic level, let's talk
about proportional control. I want the robot to follow the wall at five inches. You can't put in
five inches because it'll oscillate forever
because there's too much sensor error.
I was like, make a dead band between four and six inches.
Let's start off with on-off bang-bang control.
If the robot is four to six inches from the wall,
it drives straight.
If it gets out of that four to six inch band,
I need you to make a proportional controller
to do hard turns left and right.
And then we slowly iterate that into proportional
and then into derivative to get rid of some of the oscillations. But they don't have any
real world understanding of that based upon the 10 weeks of controls they all, well, most of them
took. I didn't. I mean, I took. I probably didn't either. I'm not going to lie. Gosh, I took way
beyond the normal amount of signals and systems.
And yet it was years in industry before I realized, oh, nobody does the Bode class.
Yeah, I had the same thing.
I also teach signals and systems as well as controls.
And we were talking about filters.
But, you know, in signals and systems class, it's all math for your transforms and plots and all that. And I had a student say, I don't understand
what this has to do with anything. And so they'd all taken a circuits class. So the next day,
even though you don't normally do this in a signals and systems class, I brought in a bunch
of op amps, RLC circuits, RC circuits, and said, this is a low
pass filter. You know what this thing is. So now this math, these signals I'm showing you are from
this thing that you built in your other class. One thing I've always said is that I don't think
the engineering curriculum does a good job of making concept maps that tie one class to the next right yeah yeah yeah exactly and people are like okay
for me i'm i'm very upfront with i love for you it just makes so much more sense than
than linear world stuff it's i like hit the circles i like the waves. Right. But people are like, okay, how do you get from Fourier to filters?
And how do you get from frequency domain to actually doing stuff?
Right, right.
I just taught AC circuits to non-majors.
We just finished a quarter.
And they were like, why are we now talking about complex numbers and how did Euler get in here? And it's just like, and so I literally
stopped talking and pointed to the outlet. This is why we're talking about complex numbers,
because we've been on DC circuits for seven weeks, but the thing that comes from that wall
right there oscillates. And they're like, oh. But where do it, I mean, I know that the house wiring
is very complex, but I didn't think it was a complex number with the house wiring.
Right. Yeah. I had a female student tell me once, the day you put those J's on the board
was the day I changed to mechanical engineering. And she's actually a working engineer now. She is a mentor for a first
robotics team. And to this day, she still brings it up. Yep. I remember that day in class,
you put the J on the board. I changed majors. They still have phase in mechanical engineering.
She didn't get away from it. She probably didn't. I agree. Just changed the I. Yeah.
Okay. So you mentioned PD loops and you actually talked a little bit about how to tune them, which is something people are terrified of.
Do you have, you know, a set of advice for people who are working on PD or the dreaded I in the PID?
Well, even though some people don't agree with it
and think it's archaic,
Ziegler-Nichols still works for me.
I honestly have my students start
with a proportional controller.
And I tell them our first step
is to get the robot to follow the wall
like a drunken sailor.
That means it's going to oscillate a lot,
but if it's consistently hugging that wall
with its oscillations, we're going to do that.
And then we're going to slowly add in some derivative, just enough derivative to get it
kind of straight. Then what we normally do, that's normally good enough, but just in case it's not,
we then add in a little integral. The biggest mistake the students make is their numbers are
normally huge and they can never get it tuned. Once I tell them that the
scale of the gains for the integral and derivative may be a multiple of 10 smaller than the
proportional, they can get it to work because just a little bit of derivative is enough for you.
I have a video where one of them is following a wall and the robot is like, it sounds like it's
like the gears are kind of grinding. And I'm telling them, guys, that's your derivative kicking
in. That's your real world derivative you're looking at right now. But Ziegler Nichols has actually been enough
for me. Interestingly, I worked as a controls and automation engineer before returning to get my PhD.
I never did any of this stuff. Software does this now. There is no doing this by hand.
You push a button and it's like automatically tuned. But I do see some benefit in having them
do it by hand because it helps them
to understand all that math they did in controls i mean they still have to do it by hand because
you only get to push that button if you've paid for a good controller yeah as soon as you go back
to the arduino land with with with motors that are not modelable, just to put it politely, you end up having to do the PID tuning all over again using a method.
Mm-hmm. Yeah.
Do you talk about sampling rate and PID at the same time?
That has been a concept I've had a lot of trouble
conveying the importance of. Very generally, and this is what I tell my students,
is that if you, because we're talking about the microcontroller loop, if you're sampling too much,
you could deteriorate performance of the robot. If you're not sampling enough, the robot is driving eyes
blind or eyes closed. So you have to find a compromise between the two. A lot of times,
and this is something one of my students taught me actually, using the timer interrupts in the
background. I used to have the students just pulling the sensors periodically inside the loop.
And one of my students is the one that's like,
if you use the timer interrupt, it makes,
you know, it'll work better.
And we did that and it did.
But once again, you had to calibrate
not pulling the sensors too often.
Another thing I will tell them is
sensors have an error as well.
So averaging data before you make a decision is good.
IR and sonar have diffuse and specular
and uniform, you know,
reflection. So if you can average the data, but one thing that was locking them up is they were
doing a for loop of 10 averages before the robot can make a decision on the IR data.
So then once again, you're controlling your sampling by doing this averaging of data.
So I only talk about it in the sense of over or under sampling
would deteriorate how the robot performs
because that affects the controller
as well as the robot making decisions
on now obsolete data.
Okay, so I'm going back
to the table of contents for your book.
Okay.
And I think the next section was sensors?
Yes. So you've mentioned some are analog and some are digital. I guess the first question is, do you talk much about inertial sensors?
I don't, not in my class. I think that would be good though. They do take a follow-on robotics
engineering course after mine. And I believe they have some of that in that class.
That class they use Android iOS and they do, I believe, some IMUs and some GPS and use the robots to go out into like a football field and search for things.
But not in my class, no.
Okay.
Then what you've mentioned encoders,
what else are you talking about for essential robotics hardware for sensors?
For my class, it's infrared, sonar, photoresistors, encoders. And that is actually
enough to get us through 10 weeks of material because we go from
obstacle avoidance to wall following. We do Breitenberg vehicles, which is reactive control,
light sensing. We do hybrid control, which is wall following. And then they have to do some
path planning to plan to a dock. And then after that, we go through and do A star and D star searches to work your way through a maze
and we do localization where the robot is in theory kidnapped and has to figure out where
it is in the world and then we do mapping so those range sensors and the photo resistors
and the encoders are enough to get us through the 10 weeks. Ideally, I could do some of those others, but I try to really focus
on control architectures without adding on too many bells and whistles, because just to get them
there is kind of major. The main prerequisite for my class is controls. And a big thing I wanted to
do was try to show them how controls looks like in the real world. And you get to SLAM, you get to simultaneous
location, localization and mapping. I get to localization and I get to mapping. SLAM is in
my dream. That's in my bucket list. So I'm now hoping to get the SLAM in the Ross course. I do
have a colleague at University of Michigan who has given me an approach for doing SLAM with
undergraduates, but it's done in simulation.
So he's just like, you can use this in your class, but I now have to figure out how to make it work on the actual robot, which I've never done. But that's always been my dream is that that class
would end with SLAM. And I've had some students in theory, tell me how to do it, but no one's
been able to get it working. So they either do localization and path planning or mapping and
path planning, or they can build the map and then use the map they built to localization and path planning or mapping and path planning, or they can build the map and then
use the map they built to localize and path plan, but they're not doing them simultaneously,
if that makes sense. Oh yeah. Because the simultaneous part was...
That's the hard part. It's the hard part. That's the hard part. Right. Yeah. So I can get them to
do it sequentially, doing it all at the same time we have not quite mastered yet.
You talk about different control architectures in your book, deliberative, reactive, and hybrid.
Yes.
What are those?
So deliberative control was started in the 1960s, and it was the first type of AI that was used.
And it's all built upon those three robot primitives of sensing, planning, and acting.
And based upon how you put those together, they define the control architecture for a robot.
So the first one was a robot would sense something about the world, such as there's an obstacle in front of me. Then it would make a plan, such as move away from the obstacle.
And then it would act and the robot would move back from the obstacle. In 1970, Shakey, the robot created
at Stanford, I believe Stanford AI Lab, was implemented by using deliberative control.
It's also called hierarchical control. The challenge people had with it is, like I just
said about eyes closed execution, that by the time the robot acted out the plan,
the world may have changed, right?
The obstacle may not be there anymore.
Or if the obstacle is a person,
the person may have walked to somewhere else.
So hybrid control was good for what it was good for,
but it was only appropriate
if you have a very static environment
that's very well modeled and reliable.
So now the research is like hierarchical control
may be good for something like a chess playing robot or a surgical robot where you know nothing about
the environment will change. So once you sense, plan and act, everything is still where it's
supposed to be. So sometime around the eighties, Ron Arkin and Rodney Brooks created reactive
control and reactive control basically said that the world is its own best
model. I don't have to have a world model in order for the robot to make decisions.
So now the architecture became sense and then act and plan was removed. So reactive control now
means I sense an obstacle, robot move. I don't need a plan, just hard code in. When you sense
an obstacle, move back. When you sense an obstacle, turn right and drive forward. And so that's what reactive control was. And then some
years later, people were like, well, wait a minute. We need those models back. How do I do localization
and mapping and path planning if I don't have a model of the world? So that's where hybrid control
came in. Hybrid control says you have a reactive layer for basic things the robot
needs to do quickly, like obstacle avoidance and wall following. Then you have a deliberative layer
for things that require the robot to have a mission plan, like reconnaissance or path planning
or localization and mapping. And then you have an arbitrator in between the two that decides
how it switches back and forth.
And then later on in the 90s, we got behavior-based control, which is similar to reactive and hybrid together, where now there are some behaviors that the robot can just do.
And then there are some things that need a higher level of planning.
I know that was a long answer to you, but you can tell i've taught this a long time it was making me think about uh con a man is that the the psychologist
um who talked about system one and system two and humans and how we're very reactive for the
most part and and and yeah it sounds it sounds like you're building human robots.
Yeah.
And how we respond to things and some things like, you know, the stove is hot.
I'm going to react to that and immediately just jump away.
But if I'm planning my trip to McDonald's, I may hop in the car and look for the golden arches and turn right and turn left.
So I'm going to have some reactive behaviors and I'm going to have some other things that
are going to require a little bit more planning.
And they all have to be able to engage together, like driving the car may become a behavior at some point because I don't have to really think hard about the car after I've done it so many times.
But as a 16 year old, you may have to think a little bit more because you haven't driven a car as much.
Right. So you need a little bit of both. Yep. How much AI do you think should be in robots?
How much AI do you get to teach to be in the robotics program?
I don't teach so much, but we actually also have an AI course.
Probably the most AI I get into is when we do the path planning.
We do wavefront propagation and we do grass fire expansion
and talk about how to create a model
of the robot's world on the robot,
on the microcontroller.
And then the robot has to come up
with an AI algorithm to use that
to plan out how to get around obstacles
from point A to point B.
That's probably the most AI
that I do in my class.
And the students actually tell me
it's pretty similar to what they do
in their artificial intelligence class, but they do it obviously without a robot. I think the amount of
AI a robot needs to have needs to be commensurate with how much you can do without being biased
and not doing things that are going to marginalize populations. I actually do a lot of talks on this
as well, and that all people have some bias. But when we develop AI technology and systems
and we are not very careful about it, sometimes that bias can sneak into our systems. And that
is not a good thing. I just did a talk about the DigiDog robots that were with the police officers
in New York back in February and March. And it's not that the robot dogs did anything, but because
people don't totally trust police or robotics right now, it was the
stigma of what it looked like, right? So I think we have to be very careful about how much AI ends
up in our robotic systems because trust with humans is important, right? And young people
obviously trust technology a lot more than maybe older people would. Yes. Well, some of the younger people know the dangers of the privacy problems
better than the older population does.
That's true too.
Back to your book, you actually put in Asimov's Three Laws of Robotics.
I did.
Where the robot may not injure a human being or through inaction allow a
human being to come to harm is the first. The second is obey orders except when it by obey
human orders except where it would conflict the first law. And the third is it must protect its
own existence as long as it doesn't conflict with the others. Are these things that should get built into robot operating
system or are these really things that we should be discussing as humans and ethics?
I think they should be discussed as humans and ethics. Not totally sure how you're going to
build a mental operating system, but I know also now share with my students, there's now a zeroth
law that has since come out about robots should not harm humanity unless it comes in conflict with the first three laws, but it's zeroth law. So I
guess it would be first, but I think it has to enter into discussions, right? I'm not sure totally
how to build it all into software, but if you have members of the team who are having these
discussions, then things won't happen. Like recently I saw there was a young man somewhere who got in trouble
because he built a drone or unmanned air vehicle and he put a gun on it and he had figured out,
I think, how to make the gun shoot in the woods. I don't know if you guys saw that video on YouTube
and he honestly did not realize there was anything wrong with that. So I think we have
to have these discussions with people because I don't think you can totally make a robot law proof.
There has to be some ethics in robotics education as well as engineering education,
which is why I believe ABET has ethics as part of their accreditation criteria, because you want to have these discussions with people who are going to be
creating this technology before they create that scary thing that sends you
running for the hills.
I mean,
the Zeroth law was because the first three laws didn't do,
didn't protect humanity as a whole.
Right.
Right.
And the reason it's science fiction is because these are the laws that robots follow, but we aren't there yet. Right, right. TikTok videos as well. And there was one, I didn't know if it was real or not. And somebody was like,
oh, you're overreacting. It's just CGI. Well, I don't care if it is CGI. I don't want to see a
CGI robot shooting people or shooting other robots. Because then I said something about the three laws
and they're like, well, that's science fiction. Well, CGI is science fiction as well, but we don't
want to give people any ideas. So how about we just not make videos of robots shooting people?
Right? So I think you're right.
I think the human is always going to be the cog in the machine and the
decision maker. Because, you know,
if you can think of these horrible things and you want to create them,
that's, that's where it comes. It's not going to be on the robot.
It's going to be on us. Yeah. It's kind of like the,
the, if you even take the robot out, you know, the,
the coded bias documentary that's kind of like the, if you even take the robot out, you know, the coded bias documentary
that's really big right now, the AI where, you know, it didn't recognize brown faces. I do in
a presentation in class about the soap dispenser that didn't recognize brown skin. Then they had
the Twitter algorithms that were taking highly pixelated images and turning them all into white
men. So these things are not even robotics,
but these ethics that we discuss are things that people need to consider who are in any area of AI
or STEM, where you're looking around the room and go, huh, everybody in this room looks like me.
Maybe I better bring in some people to do a test case on who don't look like me and make sure this
thing works for them as well. Yes. Yes. And not just a test case, but bring them in and hire them permanently.
Absolutely. Absolutely. That's part of, there's an algorithmic justice league and also Black in
Robotics has some of that, you know, in their tenants is that you bring these people into the
room, you bring them in these spaces and let them do research with you to make sure that these
things don't happen. You have a company that is involved with this, right?
A little.
Black in Robotics probably does more than my company.
My company focuses more on diversifying STEM from the perspective of getting more non-traditional people into those areas.
So that comes through me doing outreach, doing speaking engagements, doing workshops, being an educational consultant, but trying to bring in some of those nontraditional populations.
You know, everybody always talks about the leaky pipeline. And I always like to say it was not a pipeline. It's an obstacle course.
It's an obstacle course with darts and arrows and moats with alligators in the water. So if it was just a pipeline,
we could just slap some tape over the hole and be good, but it's not a pipeline. So you have to
catch them younger and younger, and you have to find creative ways to keep them excited and
interested. And what I have found is that robotics is a great way to do that. Like I said, it can be
a hook and then let's talk trig later because trig is important.
But let's get you some hands on and minds on success first.
I've done workshops for young people who walked in the room and said, I'm scared of robots.
I don't want to do this.
And I'm like, where did these kids get afraid of robots?
And it's the movies.
Yeah, of course.
Right.
Stuff that's not real.
So I have to sit them down and get them over that stigma and that fear first before I can even give them any level of success to do anything.
Okay. You mentioned the pipeline. I want to go back to that a little bit
because you also mentioned we need to engage more and robotics is definitely a way to engage
more and younger students in STEM and STEAM activities. But the leaky pipeline is about maintaining it.
Yeah. Yeah, you're right. You're so right.
I see more women getting into STEM, but still falling out. And I suspect it's not just women
who have the problem. it's everybody who is different
you're right there's an issue with self-efficacy there's an issue with not having a sense of
community and a sense of belonging I co-founded Rosebud which is Rosebudding Undergraduate
Diversity which is a scholarship and professional development program with my colleague Deborah
Walter and our primary goal for that is number one, we didn't see the students.
And then number two, if we did see them, they were either failing out,
switching majors or leaving the school.
And when you talk to them, some of the things that they said were,
I just feel like I don't belong here.
I feel like I'm not successful.
I feel like I'm not doing well.
I feel like I'm not getting good grades, et cetera.
And what research had found is that women and underrepresented students sometimes would
have higher GPAs than some of the students who stayed when they switched.
But because there had been that perception that I don't see anyone that looks like me,
they're all smarter than me, they didn't realize it, right?
So we made this program to create these cohorts in these networking communities. I'm also the advisor for the National Society of Black Engineers, where you go and engage
with other people who, if they don't look like you, they are at least invested in your
success so that you know that you're not alone.
So that when you want to quit, I can say to you, no, I failed classes too.
Yes, I had to retake the class more than once sometimes.
So they can go, that
doesn't mean you're not smart. It just means this stuff is hard. This is engineering school. One
reason you lose a lot of students is because they were the big fish in a small pond at their high
school. They was the salutatorian, the valedictorian. Then that first college calculus
test hits them between the eyes and they're like, obviously I was not meant for this. No,
this is just engineering school.
But the good thing is that at Rose-Hulman, we're not trying to weed you out.
We will help you pass.
We're not failing, look to your left, look to your right.
One of you won't be here in four years.
We want you all here in four years.
But I need to give you some tools to be successful.
When you have students who come from high schools where they didn't have to ever take
a book home, they don't know how to take notes.
They don't know how to go to office hours and ask for help.
They feel embarrassed.
I had one in my office, certain professors, and I will go ahead and say it, Black women
and women have a lot more students who come to them because I don't know if it's the mommy
syndrome or what, but I have students from all over campus who who come to them because I don't know if it's the mommy syndrome or what,
but I have students from all over campus who will come to my office in tears because they failed a
test or they had a male student look at them and go, you don't know this. I knew this in high school.
So I spend a lot of my time building up students beyond academics, just to make them understand
you belong here. You can be successful, and you can do this.
And that is just as important as I know how to integrate and take a derivative.
It's hard to keep doing that in industry, which is another place where
the obstacle course gets hard again, or the pipeline links.
Right.
Because again, it's a matter of, I don see anybody near me doing looking like me doing what I'm doing.
So I don't have a yardstick to judge myself against.
It was I finally got through Georgia Tech. I dodged all those daggers and bullets and the moat.
And then I got to Ford Motor Company as a controls engineer.
And there was a black woman who was a little bit
ahead of me and there was another woman, but they were so busy trying to keep their career above
water that they didn't have time to mentor me. And I like to say that that mentorship and that
allyship is key, but you're exactly right. I went all the way back to feeling like I did not belong,
having my credentials questioned, having my ability questioned. And it was just kind of
like, oh my God, why did I kill myself to get here just to be here? Right. I completely agree with
you. Did that drive you back to academia or did that inspire you to make more people who could
go into industry? It did both. I actually graduated from Georgia Tech knowing
I wanted to get my PhD, but I had a whole bunch of student loans and a horrible GPA.
So I needed to go work and get out of debt and I needed to do something to get my GPA up.
So I went to night school while I worked at Ford to get my master's degree at Wayne State,
which is in downtown Detroit. And I used that to get my GPA up.
But I also worked as a mentor for K-12 kids in a program called DAPSEP, Detroit Area Pre-College
Engineering Program, because I always had that heart and desire to be an educator and a teacher.
So even as I was working as an engineer at Ford Motor Company, I still found myself
mentoring the interns, mentoring the high school students, and talking to some of my
colleagues about, even though I'm here working as an engineer and getting this experience,
I'm going back to be an educator someday because that's where my heart is, right? I wanted to be
a high school math teacher before I decided to become an engineer. So that was always in me.
And maybe that's one reason why my colleagues and the comments they made bothered me so much
because I knew I wasn't really walking out
what I should be doing.
So Noir Steminist, is that your company?
Yes, it is.
What should people contact you for
if they want advice on things?
Okay.
I have created videos for organizations. I have created workshops for
organizations. I've done brief seminars. I've done speaking engagements and that's for all ages. I've
done it for adults. I've done it for companies, schools, summer programs, summer camps. A lot of
them have been virtual due because of the pandemic. But, you know, if we ever can get back out and
travel, I also can do face-to-face events, hands-on workshops that I can design based upon the skill
level of the students. I've also done some for college students, students who are at schools
that may not have a strong STEM program. So those are the things I do. I actually just recently got asked to even do some educational consulting on a K-5 STEM curriculum. So I'm basically everything robotics and STEM.
Excellent. Christopher, do you have any questions? ask educators, you know, you get a group of students come through, and then you get a new
group of students come through, and, you know, you teach them the material you have together for them.
But is there something you'd like your students to take away from your courses,
sort of a primary thing that maybe isn't necessarily just the course materials,
or something you try to instill in your students that they can take away to future work?
Absolutely.
This is going to sound a little weird, but I like them to take away that I look like an engineer.
So at Rose-Hulman, I am the only Black woman faculty member on campus.
So that means I'm the only Black woman engineer, only Black woman professor.
There are a few staff members who are Black women. So Rose Hol first got there teaching 70% white males,
I dealt with a little bit. Let me just leave it like that. So what I like my students to take away
is I look like an engineer and I look like the authority figure in the room because a lot of
them have probably never interacted with a black woman with a PhD, a black woman academic or a
black woman who's an authority figure. The other thing I like them to
take away is I don't act like your textbook engineer. I break the mold. I am extremely
personable, warm, friendly, silly, lots of things. I watch reality TV. I am a sidecomer on social
media. So I want them to see me as an engineer and as their professor and that I am not Sheldon.
I am not Dilbert, but you have to diversify your mind and what an engineer and an academic
look like.
And none of that has to do with what I'm teaching them, but that's what I want them to take
away.
And that's what I want them to hold on to.
Carlotta, do you have any thoughts you'd
like to leave us with? I do. I just really want to encourage everyone to follow the Black and X
movement on all social media. I am co-founder of Black in Robotics and Black in Engineering,
and they both have a mission to promote anti-racism in institutions, in particular STEM
institutions, to eliminate bias in technology,
such as in artificial intelligence, and promote having diverse populations in those rooms that
help to design those systems that are going to impact us all.
Our guest has been Carlotta Berry, professor at Rose-Hulman Institute of Technology.
She is the Lawrence J. Giocoletto Endowed Chair and Professor of
Electrical and Computer Engineering. Thanks, Carla. Thank you. Thank you for having me.
Thank you to Christopher for producing and co-hosting. Thank you to our Patreon listener
Slack group for questions, especially Scott and Nathan. You can join the Patreon listener Slack
group.
And of course, thank you for listening. You can always contact us at show at embedded.fm or hit the contact link on embedded.fm. And now a quote to leave you with from Mae Jemison,
never be limited by other people's limited imaginations.