How to use rqt_console for debugging in ROS

How to use rqt_console for debugging in ROS

Learn how to use rqt_console for debugging by setting the logger level for ROS nodes. We’ll see some sample messages generated, including that of a turtle, which we will intentionally run into a wall!

Let’s go!

Step1: Create an account and/or Login to Robot Ignite Academy (RIA)

On RIA, you get access to the best online ROS courses and environment. No need to install and set up ROS locally – the only thing you need is a browser!

  • Create an account and/or login here.
  • Launch the ROS Basics in 5 Days Python course.
  • You’ll now have access to the simulation screen with a Notebook, an Editor, four Shells, a Simulation Window, and a Graphical Interface. We are only using the Graphical Interface and Shells for this demo.

Step 2: Launch rqt_console and related commands

Start the RQT tools and a Turtle:

  1. On Shell #1, run rqt_console: user:~$ rosrun rqt_console rqt_console
  2. On Shell #2, run rqt_logger_level: user:~$ rosrun rqt_logger_level rqt_logger_level
  3. On Shell #3, run  turtlesim_node:  user:~$ rosrun turtlesim turtlesim_node

Cannot see much output yet? Not to worry! Now click on the computer monitor icon to the right of the Editor screen to open the Graphical Tools app.

Open the Graphical Tools

Open the Graphical Tools

You should see a screen shown below:

rqt_console Debugging Screens

rqt_console Debugging Screens

The three windows shown above are the ones we launched on Shells #1-3 earlier.

  • The rqt_console window shows messages from the current node being debugged, based on the Severity level set.
  • The rqt_logger_level is where the Severity (or Verbosity or Logger) level is actually set for each node.
  • The TurtleSim window shows the “scapeturtle” we’re using for experiments in this post 😀 .

The current Severity for the /turtlesim node is Info, as you can see from the image. Let’s change that.

  1. Focus the rqt_logger_level window by clicking on it.
  2. Click on the “Refresh” button under the Nodes lists. You should see the /turtlesim node appear now.
  3. Select /tutlesim from the Nodes lists. Looking at the Levels list, you’ll see that “Info” is selected for this node by default.
  4. Change the Level from “Info” to “Debug” and observe the changes on the rqt_console screen. What did you notice? Too many messages among other things!
rqt_console - Before Changing Logger Level

rqt_console – Before Changing Logger Level

 

rqt_console - After Changing Logger Level

rqt_console – After Changing Logger Level

Perhaps everything has been a bit boring till now, so now let’s move to the fun part – run the “scapeturtle” into a wall!

  1. Change the Level to “Warn” in the rqt_logger_level window.
  2. Clean all current messages on the rqt_console window by clicking on the brush icon.
  3. On Shell #4, run the keyboard teleop in order to control the turtle: user:~$ rosrun turtlesim turtle_teleop_key
  4. Keeping the Shell #4 active, use the keyboard to move the turtle forward for a few seconds, so that it runs into the wall!

Now go back to the Graphical Tools window, you should have something like this:

rqt_console - ScapeTurtle runs into a Wall!

rqt_console – ScapeTurtle runs into a Wall!

So you finally ran the turtle into a wall…move to the next section for the verdict!

Step 3: Master the Concept: rqt_console and Logger Levels

rqt_console is for viewing the messages from nodes according to the verbosity level, which is set with rqt_logger_level.

Here are key points to note about the Levels:

  • Debug is the lowest level, and Fatal is the highest.
  • The lower levels usually have more messages than the higher ones. In fact, we would prefer not to see messages from levels like Error and Fatal!
  • Each Level will also show messages from the Levels below it. For example, we would still get the Warn messages on Info level. (Try it out!)

Read more above the Levels at: http://wiki.ros.org/Verbosity%20Levels

And that’s it!

Extra: Video

Prefer to see the ‘sights and sounds’ version of this post? We made this video just for you!

Feedback

If you are interested in this topic, please check our ROS Basics in 5 Days course where you’ll learn more about the debugging tools available in ROS.

Did you like this post? Please leave a comment on the comments section below, so we can interact and learn from each other.

Thank you!

RDP 025: Hardware Robot Operating System (or H-ROS) With Victor Mayoral

RDP 025: Hardware Robot Operating System (or H-ROS) With Victor Mayoral

 

In this episode I talk to Victor Mayoral, CTO of Erle/Acutronic about their Hardware ROS (or better known as H-ROS). We will talk about how they have implemented this hardware framework for building ROS based robots by combining hardware parts that natively work on ROS (no drivers required in the main computer). He will also explain us how to ROSify any hardware by using their SoM, and how they have applied this procedure to build a collaborative robot called MARA. And everything is working on ROS 2!

Selected quote:

“With H-ROS we make sure that all the components of the robot (sensors and actuators) speak the same language (and dialect!) simplifying enormously the integration process”

Victor Mayoral

Victor_Mayoral_ROS_developers_podcast_25_H_ROSRelated links:

Subscribe to the podcast using any of the following methods

RDP 024: Using ROS 2 For Autonomous Cars With Dejan Pangercic

RDP 024: Using ROS 2 For Autonomous Cars With Dejan Pangercic

 

In this episode, I talk to Dejan Pangercic, the CTO of APEX.AI a company that is creating the first fork of ROS 2 to create a new operating system for autonomous cars based on ROS: The Apex.OS. Dejan explains us why ROS2 is the way to go for autonomous cars, how are they modifying the main release of ROS 2 to create a certified version of it for self-driving cars, and how all that integrates with Autoware.

Selected quote:

“We can consider that Apex.OS is for ROS 2 what Red Hat is for Linux”

Dejan Pangercic

Dejan Pangercic Apex.OS demo

Picture take while Ricardo Tellez (right) visited Apex.AI at Sillicon Valley. Dejan Pangercic (left) did a live demo of their Apex.OS system on an autonomous car

Related links:

Subscribe to the podcast using any of the following methods

RDP 023: Using ROS to Teach Foundations of Robotics With Ross Knepper

RDP 023: Using ROS to Teach Foundations of Robotics With Ross Knepper

In this episode, Prof. Ross explains how he uses ROS to teach foundations in robotics. He tells about how he synchronizes the teaching of ROS with the teaching of robotics subjects, as well as his use of simulations and the importance of debugging tools for ROS. He also explains why he doesn’t use the ROS navigation stack or MoveIt! with his students.

“On my second lecture on ROS I introduce the Drunk Turtle where I introduce deliverate errors, so students can see what happens when you have different categories of errors.”

Ross Knepper

Ross Knepper teaching ROS to students

Ricardo Tellez: Hi, ROS developers. And welcome again to the ROS developers podcast. Today, we are interviewing Prof. Ross Knepper. Ross is the assistant professor of the department of computer science at Cornell university. There, Ross has been teaching foundations of robotics and human robot interaction and robotic manipulation. Today, he will explain us how is he using ROS for teaching all those robotic subjects. Welcome to the podcast, Ross!

Ross Knepper: Hey Ricardo, thank you for having me on. 

Ricardo Tellez: Our pleasure of course :). I would like to go straight to the first question. Why are you teaching ROS? 

Ross Knepper: Sure. So as you mentioned, I teach a course called the foundations of robotics and it was actually a student request. First, I wasn’t teaching ROS and a lot of students were asking me, can we please learn ROS? It seems like an important job skill. And so I decided, well, it fits naturally in the course and I’d be happy to integrate it. 

Ricardo Tellez: Okay. And then you are teaching this as a separate subject or its included into another subject, or the ones that you are teaching as a part. 

Ross Knepper: So the class, as I mentioned, it’s about the foundations of robotics, kinematics, navigation control, uncertainty and for the project component of the course, when the students do their implementation, they use ROS in that. So at the beginning of the semester, the first project is basically all about learning ROS so that the students can use it later on when they work in their robots and simulation. 

Ricardo Tellez: Okay. And which version of ROS are you using? 

Ross Knepper: We are using the latest ROS, Melodic

Ricardo Tellez: Melodic. Why that one? Why not another one? Why don’t you use another version, like Lunar?

Ross Knepper: I think ROS is pretty stable right now. There don’t to be a lot of changes, at least that impact most users. And so it seems pretty invariant to version, honestly. So I want the students to come away knowing the broad foundations of ROS and how to build projects in ROS. I’m not really so concerned with the particulars of one version versus another one. 

Ricardo Tellez: That’s a very good comment! Because I actually also agrees with you that the version of ROS is not really so important in most of the cases. I mean, except when they change from a ROS catkin for example. Apart from that, ROS versions are more or less, they share the same core that is the same. And it’s very stable. And we’ve got this question asked many times because we have an Academy for teaching ROS, and they ask:”But which ROS version are you teaching?”. And then we say: “Well, you mentioned it’s not so important because the core is maybe just for a specific packages.”

Are you using any specific package that requires a specific version of ROS?

Ross Knepper: No, we’re not. I mean, honestly, my philosophy for ROS is that what it’s really good at is interposes communication and it provides a type system which is robotics relevant. So we have the students build their own projects. Each assignment is its own separate project, which is its own package. We don’t really use a lot of the existing ROS package infrastructure beyond the real basics. Because there’s a lot of stuff out there varying quality. Some of it is robot specific. In the early days of ROS, there was a tremendous amount of software on the PR2 stack. And if you have a PR2, it was amazing. You could do so many things with it. But as soon as you tried to run it on some other kind of robot, your mileage would vary considerably. So I’d rather have the students be prepared for whatever robots they wind up using in their future work, rather than thinking they know more than they do, just because it happened to work on one model.

Ricardo Tellez: I see. But I presume that you are using, for example, the Navigation Stack or the movelt package?

Ross Knepper: No, not even those. We use those in research. But this is really, as the class’s name, it’s the foundations of robotics. So the students create their own controller, which operates at a lower level below the Navigation Stack. Similarly they’re learning to do inverse kinematics. They’re learning to control the robot arm and move it. It’s a great tool when what you want is to not worry about how those things work.  But you don’t want students going out thinking they know everything about robotics, and then they realize they don’t actually know how to control an arm because it was done for them. That’s really the level at which we’re teaching this. And when they discover these packages later, there’ll be very pleased.

Ricardo Tellez: Afterwards. Yeah, exactly. Yeah. It’s like teaching people to add and do root squares, but then afterwards they can do it with a calculator and then, yeah. 

Ross Knepper: That’s it, that’s a very apt analogy! Because the course that I teach is actually basically a math course. It’s a lot of linear algebra, a lot of differential equations with robotics applications, of course. But the foundations of robotics is really fairly mathematical. And so we teach this sort of broad range of concepts with applications on the robot and then they go and actually implement the math, using num PI, using ROS, make things work and they see the robot move and that’s a very powerful reward. And I think also the math is much more intuitive if you have an application for it. It’s one thing to learn how to multiply matrices, but to understand what a rotation matrix actually is doing to a rigid body and to see it on the screen is very powerful.

Ricardo Tellez: Which level of education are you teaching? I mean, it’s undergraduate or graduates?

Ross Knepper: It’s an elective at the undergraduate level. I do get grad students taking it as well, so masters and some PhDs take it. It’s a great way to catch up. Maybe you had a little bit of robotics research in undergrad, or maybe you had some informal experience through extracurriculars, like first robotics. You might have a lot of intuition, but not be up to speed with all of the foundational concepts. So it’s really to get everybody to a level playing field.

Ricardo Tellez: Okay. And how do you structure that teaching? I mean, you mentioned before that you were doing some projects and the first project was to learn ROS. So how are you teaching this?

Ross Knepper: That’s right. So all of the projects are done in simulation. We use the turtlesim for the first one and then once they’ve learned ROS, we’re using the V-REP simulator for the remaining four project. So they do for example, in project two, they’re going to learn motion models for different types of mobile robots. So they learn differential drive, Ackerman steering, they learn how to convert between the two. So if they want to achieve a certain linear and angular velocity what is the math behind that conversion? And then they’ll see robots moving on the screen and try to follow lines and so on, on the screen. Project three then is going to be about arm kinematics. Just these basic concepts.

Ricardo Tellez: And at that point they already know ROS. At that point they can apply what they are seeing on the theoretical classes and then apply. 

Ross Knepper: That’s right. So for the first project, maybe it seems a little silly they’re using turtlesim to draw a flower on the screen. So it’s just a pretty picture, but you introduce all of the important concepts. So you’re publishing and subscribing, you’re using a service, you’re using a rate to control the speed at which it sends commands. You’re setting and getting ROS parameters. So all the basic ROS tools are in there and then they learn the command line tools as well. Especially for debugging. So, my wait for service is not returning, why would that be? Well you can run ROS service list and see like, is it running, Oh, I forgot to run the server. That kind of thing.

Ricardo Tellez: Yeah. And then you mentioned that, so you are using simulations for that, are you using any real robot at the end or at some point in time?

Ross Knepper: Well, for this particular course, no, it’s entirely in simulation. We actually have a server farm in the basement of our building that’s running 150 virtual machines. We have 150 students in the class, and we give them all identical configuration so that they don’t have to worry about installing all the right packages and running Ubuntu and all of that stuff. It’s all given to them and they can focus on just learning ROS, just learning robotics.

Ricardo Tellez: Great. And why are you using the V-REP simulator instead of using, Gazebo for example, that is the one that comes with ROS.

Ross Knepper: Yeah. So I know that Gazebo has a lot of fans. We benchmarked a few different simulators and we found that Gazebo is very resource hungry. So eats up a lot of memory and a lot of CPU and it seemed like to get decent performance, say 20 frames per second, you need four cores. Whereas V-REP seems to run very comfortably in one or two cores. So I don’t know much about under the hood what’s going on, but we found that in our server farm, we could get away with half the cores by switching to V-REP.

Ricardo Tellez: Yeah. And I think that both of them, they use the ODE [12:05 inaudible] extension. So that’s strange. Maybe it’s something related to the visualization, that’s different, maybe, could it be instead of the physics?

Ross Knepper: Yeah. Another aspect is that Gazebo has this client server model, so it’s running separate processes and that may, it’s a nice abstraction because it means that you can run the client and server on different hosts, but it may also introduce some overhead as well.

Ricardo Tellez: Okay. So how much time are you dedicating to teach ROS?

Ross Knepper: So it’s sort of a lightening introduction to ROS. So I do one lecture that covers a lot of the basics, client server model, published, subscribe, nodes. I give them some examples and some basic readings. I have them do readings from a book called a gentle introduction to ROS by Jason M. O’Kane, which is a great book.

And I think there’s only so much listening to somebody talk about ROS that’s useful. So beyond that, I think it’s actually much more valuable to learn by doing. And so I want to get the students to dive in early and just start playing with it and see what they can do. So, project one actually goes out on the first day of the class. They have a couple of weeks, so we’re actually just coming up on the end of the first two weeks of class right now. And the students are learning a lot through trial and error, through course staff assistance. And it is sort of like learning to swim by being shoved into the deep end of the pool, for a lot of the students and it feels very intimidating because the course, it’s a big mix of disciplines. Although I’m in computer science, a majority of the course is from engineering. Mechanical engineering, electrical and computer engineering and so on. And all these different backgrounds, many of them are not as confident at programming in Python. So there’s a lot of these factors that make it intimidating. And I think it’s important to get past that intimidation and just say, I’m just going to try, I’m going to dive in, do my best. And inevitably they learn a lot and they come out much more aware than they went in. And of course they will continue learning ROS throughout the semester. There’s going to be things they didn’t quite pick up in the first one. And, really, it’s by talking with friends, we actually encourage them to collaborate. Although they have to submit their own solution, we tell the students, please work together, talk to each other. I think it’s much easier to learn from your peers sometimes than to learn from a professor.

Ricardo Tellez: Do you know the learning ROS is not an easy thing that usually students say they struggle like doing this. So can they cope with all that knowledge? Don’t they have any problem on learning ROS, and they get afterwards later in the semester, they get a star because they are missing some learning of ROS, some knowledge of ROS.

Ross Knepper: Well, the projects are designed to make sure that they do have a little of the basics and when students appear to be struggling with a particular thing, we reach out and make sure that they’re getting the help that they need.

Ricardo Tellez: So they have your full support.

Ross Knepper: Exactly. So, I mean, part of the point of this project is just to see where everybody is. So they submit their code and maybe parts of it aren’t working quite the way they should. And that is a diagnostic tool for us to be able to reach out to them and say, it looks like you could use a little additional help. 

Ricardo Tellez: How many students are we talking about?

Ross Knepper: It’s 150 students in the class. And for Cornell computer science, that’s a small undergraduate class. A lot of our courses are 600, 700 students now. Cause you know computer science has become a very popular major. 

Ricardo Tellez: That’s very good! And which language are you using for programming the robot? You mentioned pipeline before?

Ross Knepper: Many of the students have learned MATLAB and there is a MATLAB bridge to ROS. We’ve had in the past; we’ve had sort of mixed results with that. I think it’s gotten a lot better, but we decided that it’s much easier to teach it in one language. And I think Python, if you know MATLAB and we give enough pointers, it’s pretty easy to Python. So Python with numb PI, you get most of the functionality. 

Ricardo Tellez: That’s right. We interviewed with one of the designers of the ROS packages for MATLAB in a previous podcast. And then they show us very interesting things and they are for example, creating, generating from MATLAB code generating ROS nodes. So you can actually execute that too afterwards inside the robot and quite interesting. Just to let you know, in case that you want to have a look afterwards. 

Ross Knepper: Absolutely. 

Ricardo Tellez: So yeah, I wanted to ask you about, you were explaining about the different projects you were teaching, and the question is, do you have any notes online about that, slide or something that, so that the listeners to the podcast can have access and use it for their own learning of ROS for example?

Ross Knepper: Oh, I see. Actually, I do all of my teaching on the Blackboard, so I don’t have any slides or anything to share.

Ricardo Tellez: Wow, impressive. So how could you know this structure? Do you have some notes for you, but a paper or something like that?

Ross Knepper: I do. I think my notes wouldn’t make a lot of sense to other people, but I mean, I learned a lot of this the hard way. I started using ROS when it was in its infancy and a lot of things were broken or didn’t work the way they were advertised. And so it was really learning, like shoved into the deep end of the pool and I mean that afforded me a certain opportunity to organize information in a more effective way. And there’s been a tremendous amount from the community of tutorials and books and just all kinds of resources since then. So I think it’s much easier for students to learn now than it was in the old days. If they’re willing to put in the time.

Ricardo Tellez: That’s the only thing. But yeah, fortunately it’s like that now, we’re improving. And then let me ask you one question. So based on your experience, what is the biggest problem that you are facing when teaching ROS?

Ross Knepper: Debugging, I think. It’s a hard skill to learn and I try to explain to the students. I mean, the engineers have had sort of an intro to programming course and they’ve done some basic debugging. But it is somewhat of an art form. I mean, I explained to them, it’s like being a detective. Imagine that you’re Sherlock Holmes and it’s the deductive reasoning. It’s the asking, what if, it’s being experimental and sort of changing things in a deliberate way and seeing what happens. But you really have to have somewhat of an understanding of the whole system and how the pieces connect together to do that effectively. And when you’re new to everything, it can be hard to understand what are the right experiments to run or what are the right things to check for.

Ricardo Tellez: Yeah. So let me ask, can I check if this topic is running or should I, I do mention before, should I do a list of the services that are running? Maybe something stupid like that. 

Ross Knepper: Exactly. So something that I think is a wonderful idea is there’s this command ROS WTF and the idea is it just looks around and it says, aha, here’s some things that might be wrong.  But this command is designed for people who are proficient at ROS already. And I think that there’s an opportunity to create a version of this command for ROS newbies. So, trying to spot elementary mistakes. So for example, if you have the same topic name, but one is in the root and one is a namespace, or maybe there’s a typo in a topic name. So two very similar looking names. If, what’s a good example? 

Ricardo Tellez: You launch two nodes that have the process, images from different cameras for example.

Ross Knepper: Yeah. So there’s I think an opportunity because the task is fairly circumscribed, there’s an opportunity for a process like ROS WTF to come in and kind of look around and give friendly feedback sort of. So, if I were to say, what’s one thing that’s missing right now, it’d be sort of more newbie friendly ROS WTF. 

Ricardo Tellez: Okay. That would be a very interesting project to do, practical ROS, what the command that actually suggest you, where to look at. 

Ross Knepper: Where’s the failure is I believe what it stands for. 

Ricardo Tellez: Where is the failure. From now on I’m going to take that, those words to ask to talk about that command.

Based on your experience, how would you recommend other teachers to attach the ROS teaching?

Ross Knepper: Yeah, that’s a great question. I think there’s a lot of enthusiasm among the students. They understand that this is becoming sort of an industry standard thing. Some employers are looking for this, so there’s a lot of eagerness to learn it, but they also coming in, they don’t really understand what that means. So the challenge in education is to help them stay motivated while they’re learning it and not get burnt out. So having, exciting real projects to try. I mean I use the full immersion approach. I think there’s probably a more incremental version if you wanted to focus more on ROS as its own thing. And maybe just add new functionality with each project. But yeah, I think keeping the applications feeling relevant and exciting because it’s hard to imagine, like if I just tell you, okay, there’s this thing called a ROS node and it can subscribe to messages and there’s a callback right in the callback gets called whenever a topic gets published. It’s very hard to imagine, like, why do I care about all of this? Exactly. So as soon as you start plugging in motors and cameras and suddenly there’s data on these topics and the data has some meaning and you start looking at the data and maybe it’s a laser range finder and you start thinking about, well, how do I interpret depth as data? That’s actually a hard thing. You need to know where you are, you need to register it to some map. And so it actually motivates a lot of the important robotics problems that we teach in a whole new way if the student can get their hands dirty and just start playing with the concepts themselves.

Ricardo Tellez: I do agree on that. Basically I think that ROS and robotics has to be taught from the inside to the outside. So instead of teaching what is a node, I believe in my opinion, is that it has to be okay, I want to move the robot and then you need a program that connects to the topics, or I need to read the data from a sensor and I need to process for detecting people and the same sensor for detecting, I don’t know how to do that , but it’s the same sensor. So now that makes sense to have a topic because every program can connect to the same amounts of data or something like that. So from that inside, I need this and to understand why nodes, why topics…

So okay, thank you. So then I’m running here out of questions. So my question, it’s about to finish. What do you think about the future of ROS? Do you think that is something that is going to stay for research and education, or do you think it’s going to become more for commercial use for industry and products?

Ross Knepper: I think there’s an appeal to use it in industry, because it’s a standard that people know coming in and it works. And so at least for the basics, it seems very effective at what it does. I think the challenge for ROS is really the ecosystem of the stacks and packages that are contributed by the community. We see in the early days, Willow Garage created this wonderful stack for the PR2, and did amazing things with it. Meanwhile, a lot of academics were creating their own hierarchy. And what would happen is the PhD student would create a ROS package on their code. It would work on their robot and maybe not on any other robot. And then they graduate, and it’s not maintained. So I think there was this explosion of packages, which was exciting to see, but a lot of them were fairly low quality. And if somebody else wanted to use it, it was a significant amount of extra work. So this is still an improvement on what came before, because we have this foundation of interprocess communication and types. That’s sort of the clearly useful stuff in ROS, which everybody uses. And so the question is how do we go from there to higher level of functionality? And you mentioned a couple of examples, the navigation stack in [28:28 inaudible]. These are things that do appear to translate from one robot to another pretty well. But I think right now these are the exception more than the rule, I guess another one would be gmapping seems to be pretty good with slam. 

Ricardo Tellez: [28:46 inaudible] is also quite nice.

Ross Knepper: Yeah. No, absolutely. These are good packages. I mean, these are the ones that my grad students need some functionality. I’m going to tell them, use movement, use navigation. Why reinvent the wheel? But it’s quite hard to build software that is robust, keep it well-maintained, make it portable. So that’s really the big challenge right now. And I think there’s a lot of corporate interest in this because if they’re solid stacks that they can pick up and use on their robot, that makes it instantly accessible because everybody’s code will work on their robot. So there’s actually a lot of corporate interest in improving the quality of these higher-level capabilities. And I think the struggle is going to be well, do we want to follow the Microsoft model and make everything proprietary or do we want to do sort of the open source model and we can just release the code for a robot. It runs for us and you can do whatever you want on top of it. And I think that in the long-term is going to win out.

Ricardo Tellez: That’s a very good point. I didn’t think about that in this way.  But that’s a very good point. Obviously, what happens with those packages that people [30:09 inaudible] they are going to stay as open source or as proprietary. As far as I know for the projects I’ve been following, they look like, they are going to stay as open source.

Ross Knepper: Sorry, Ricardo, you cut out there.

Ricardo Tellez: Oh yeah. Sorry. Yeah. Well, I was just saying that I think that it’s going to be open source cause it’s what the current packages that I’m following, and they look like, but we’ll see the future. Finally, one last question. So any tool that you would recommend to the listeners that may be useful for ROS programming or learning or any projects that you have developed for that purpose?

Ross Knepper: Yeah. I think for people who are learning ROS, it seems like often the focus is on the sort of in code stuff, creating subscribers and callbacks and all of that. And I tell my students about all of these command line tools, and it seems hard to remember to use them. And a lot of them are special purpose. ROS service is exactly for one thing. But there’s a few other tools out there, rviz, there’s a few tools that are broad that help you to visualize a lot of what’s going on in your ROS installation. And I think once you have a little more clue about what’s going on, these things and really propel you forward in your debugging and in your just understanding of your system as you’re developing. 

Ricardo Tellez: Are you [32:00 inaudible] useful things like rqt cloud, [32:03 inaudible] the branch of utilities on rqt. 

Ross Knepper: And these are intimidating if you’re a newbie because rqt, you get this empty screen when you start it out, what am I supposed to do with this?

Ricardo Tellez: And when do you start adding some new visualizations [32:24 inaudible] and how do you connect to make them show you useful information.

Ross Knepper: Exactly. Exactly. So it’s sort of a second tier after you’ve learned the basics, but I think it’s really important to remember that these things exist and use them wisely. 

Ricardo Tellez: And also it goes on the line that you mentioned before about the debugging. Learning how to debug. I want to tell you about the value [32:49 inaudible] we are publishing some videos, teaching how to do something in ROS.  And then we publish them and then everything goes okay and everybody’s happy, but then what happens is one day somebody else is watching the video. Again, they are trying to work with ROS at home and something failed because of course it’s not the same configuration, many, many things can happen. So what they are missing, some people is telling us, Hey, please can you do some videos, you get mistakes. And then you try to solve them, [33:25 inaudible] we can see what is your deductive procedure for detecting where the error is. So that goes also [33:32 inaudible] of debugging.

Ross Knepper: Yes. In fact, I told you, I do one lecture on ROS. The first half of it is just the dry, nodes and services. The second half is exactly what you said. So I do a live coding example called drunk turtle, and I introduce deliberate errors. And so the students get to see what happens when you make different categories of mistakes. So for example, running in the wrong namespace is a big one because things just, nothing happens. And then, well, what do I do? And nothing happens. You have to use tools to debug. Another example, which I think a lot of students can spend a lot of time on. In Python, If you forget the line at the top, the hash bang user [34:26 inaudible] if you forget that line, the error that you get is really confusing because it will try to run it, I think, as a bash script. And it gets surprisingly far before it errors out. And it gives an error on line 10 about some parenthesis that it wasn’t expected.

Ricardo Tellez: That makes completely no sense about what is actually happening.

Ross Knepper: I guess my newbie version of Russ WTF would look for things like this too. But I think it’s important for the students to see what these mistakes look like and what is the thought process that one goes through. And so even though it’s a really silly example of just a turtle drunkenly wandering on the screen, we drag it out to about 20 minutes just with the debugging and the trial and error. And so I think it’s actually pretty effective. And then I post all the code on Piatsa for my students to run through it themselves and see what went wrong and they reproduce it and get the same errors. And so on.

Ricardo Tellez: That’s a cool idea. I think that we are going to use this idea with your permission. And also these things, introduce errors in our videos and in our lessons that we do around there. Okay. So Ross, thank you very much. It’s been a pleasure to chat with you and to learn about your teaching about robotics and especially about how you teach ROS. And thank you very much!

Ross Knepper: Thank you. It was my pleasure. And by the way, yes, people do make a lot of jokes about Ross and ROS. 

Ricardo Tellez: Okay. I didn’t want to do it here, because it’s funny, but in your case is Ross with s, is super Ross. Thank you very much Ross. 

Ross Knepper: Thanks so much. Have a nice day. 

Ricardo Tellez: Thank you. And to all the listeners, thank you very much for listening to this podcast. Remember that we’ll have another podcast in the next week, and also remember that we, the company that is producing this podcast, it’s called The Construct that we have an Academy, an online Academy called the Robot Ignite Academy, where you can learn ROS in an online environment without having to install anything. So it’s quite easy, just open a web browser and you are in starting learning ROS with beautiful lessons that we have prepared. So thank you very much to the listeners and see you next week.

[Music]

Related links:

Subscribe to the podcast using any of the following methods

For teachers

A Full ROS & Robotics Teaching Solution

Trusted by hundreds of universities

RDP 022: Building Warehouse ROS Robots With Melonee Wise

RDP 022: Building Warehouse ROS Robots With Melonee Wise

In this episode I talk to one of the mothers of ROS, the co-creator of the Turtlebot robot, and the CEO of one of the most important companies of the world that sells ROS based Warehouse robots (Fetch Robotics). Among other things, she will explain about their work to simplify the control of fleets of robots based on ROS1 or how they use simulations in their development process.

Selected quote:

I think ROS is definitely very mature, and the challenge for people not using ROS in their products is on how well they know ROS.

Melonee Wise

the construct meets fetch robotics

Related links:

Subscribe to the podcast using any of the following methods

Pin It on Pinterest