Teaching with ROS or ZeroROS at university?

Hi all,

I’ve been working with ROS for a long time. Still, I’ve always found it difficult to use it for teaching without having to overload students with tons of side-materials (learn Linux, bash, manage your dependencies, bashrc, docker, VMs…) that are not part of the learning outcomes of the module. Not to mention that students can have any laptop/OS and ROS is quite limiting (especially ROS1).

For this reason, I’ve always defaulted to Python - easy to use, no need to compile, multiplatform, multi-arch… but I always missed the ROS-flavoured topics, subscribers, etc.

For this reason, I’ve developed ZeroROS (GitHub - miquelmassot/zeroros: Python-only dependency-free middleware that resembles ROS using ZeroMQ) - a python-only, dependency-free middleware that shares the vibe of ROS (topics, subscribers, messages) providing the same coding patterns (callbacks) without all the hassle of dealing with the abovementioned side-materials.

I am looking for your experiences in teaching ROS - and how you’ve overcome the barriers of university-managed PCs to enable students to learn proper robotics with middleware (ROS or others).

To put a bit more context - I am teaching mobile robotics (motion, sensing, self-localisation, obstacle avoidance) and need a simulator (I’ve picked Webots for simplicity, low resources) and a middleware that can scale to ROS if the student wants to follow up with an MSc project or as PhD thesis without having to learn a completely different middleware. ZeroROS has only a subset of what ROS can do, its API calls are similar, and the message definitions are the same. Code could be just copied&pasted to a ROS project and it’d work just changing the imports.

7 Likes

We have been working on an open-source project called Robot Raconteur that has been very successful with students. It is designed to be standalone, and requires minimal setup. It has plug-and-play capabilities with Python, Matlab, and LabView, so there is almost no setup required for students to connect to devices. Students simply need to install the pip package or Matlab extension, and they are connected and interacting with devices in a few minutes. (Compiled languages use generated code for the specific communication types.) We have used this technology extensively at Rensselaer Polytechnic Institute in the classroom and in research.

Robot Raconteur is available in most relevant package managers, and is also available as a ROS package.

Please see GitHub - robotraconteur/robotraconteur: A communication framework for robotics and the Internet of Things, developed by Wason Technology, LLC for the core software and GitHub - robotraconteur/robotraconteur-directory: Directory of device drivers, applications, utilities, examples, and documentation projects for Robot Raconteur . There is a Gazebo based self-contained simulator that can be used to interact with virtual devices with drivers that match the real robot interface: GitHub - robotraconteur-contrib/robotraconteur_training_sim . (The conda packages can be a little flaky so leave an issue if the installation doesn’t work.) We have a lot more under development that will be added over the next few months, including more drivers and improved introductory documentation.

I’m of the personal opinion that there are two but separate robotics courses potentially needed:

  • An introduction to robotics concepts, techniques, and algorithmic overviews, which should not introduce ROS, any middleware, or even software engineering at any real extent beyond the minimum coding needing to actually demonstrate the current lesson. This is about fundamentals which are needed regardless of the current tools of the day.
  • After learning the rudimentary basics on transformations, planning, control, etc – then a follow up course doing more software-engineering based robotics whereas ROS is a module within the course to discuss the basics of it to be used in later projects / modules for doing more advanced robotics techniques. Let students as they progress in the course discover and play around.

In that breakdown, the overhead of learning some Linux, bash, etc is actually quite important to be done because those are important skills for the real-world. You can teach many of them, but also through different homework assignments and projects, they’ll run into their own problems and work it out among themselves. If you’re teaching a-ROS-like-thing as part of the course, then I would think you should just teach ROS and the tools needed to interact with it so that once they go into industry or begin an independent research project, they have the basic tools to succeed. If you don’t have the time in an introduction course to do that, I don’t think that middlewares or communication frameworks are an appropriate subject. It gives them a false impression of what they need to know to succeed.

Personally, I think you and your students are probably better served by not making ROS part of the syllabus for a first-level introduction to robotics. There is definitely a thing as too early to teach ROS. I’m not of the opinion that ROS should be taught until students know the fundamentals.

11 Likes

Really cool! Also quite aptly named since it would really come in handy on the first gen Pi Zero which is an armv6 that doesn’t support installing even ROS 1 from packages, so one needs to compile the entire thing to get… what’s essentially this project, that does the same thing with one pip install :smiley:

1 Like

Slightly off-topic, but if the main blocker to use “real ROS” is the requirement for “a full install”, I’ve always found rospypi/simple very useful.

On-topic: I largely agree with @smac, but it would depend on the learning goals of the course.

If the goals do not include “setting up a real-world dev-env/robot”, the hassle with all the infrastructural parts @miquelmassot mentions is too much.

But if the work-around is to implement a surrogate ROS (in Python this time), are you really still teaching ROS, or a set of software architectural interaction patterns for component based software engineering?

1 Like

@smac I agree with you. If all students walked into my lecture with a Linux laptop I could probably give it a go. For me, it is accommodating to any hardware specs, any OS - the main issue. Let’s say they know the fundamentals and they want to give it a go in simulation. I believe many of us would have been taught in Matlab in the past because of its ease of use (pricey though) - but because students just install it and it runs. I can’t find this in ROS.
For my learning objectives, I want to teach them software architecture (processes, topics) and some very-very basic software engineering in Python alongside robotics so that they scale this up to an industry job.

I come from the experience of shipping VMs and expecting students to learn bash, ssh, and ROS and ending with students overloaded and not feeling motivated (VMs too slow, storage issues, no curiosity for self-learning…). What they claim is that this is not what they signed up for when they enrolled on a robotics course, and they are right. The main content of the module should be robotics, not software engineering.

@gavanderhoorn It’s more the soft architecture, pub/sub and callbacks, which they will find in ROS if they decide to jump to an MSc project or PhD thesis. Currently, the learning curve for a PhD student to grasp ROS is steep, what can we do to soften it?
About rospypi/simple - I haven’t found if roscore is needed or not - I can give it a go. It would be nice if it was pip-installable.

Side comment: you guys really, really need to change the name from “zeroROS” to something else.
Googling for zeroRos, even quoted with “zeroros”, doesnt show anything even vaguely relevant.
Shows a whole bunch of OTHER things though.

The just released 3rd edition of Peter Corkes Robotics, Vision and Control has been rewritten to use Python instead of Matlab Robotics, Vision and Control: Fundamental Algorithms in Python | SpringerLink and has a python toolbox implementation to support it GitHub - petercorke/robotics-toolbox-python: Robotics Toolbox for Python. It mentions ROS in places but is not primarily teaching ROS. We are planning to use this next year

Are there not campus computer labs with linux? Also, WSL works pretty well on Windows and I’ve seen several people get ROS working on that without a problem - so linux isn’t really even a requirement.

I don’t necessarily think that’s a good idea or particularly effective if they can’t even work in relatively basic programming environments like the terminal. I think you should teach either a software-based course or a robotics-fundamentals course, but not together. If they’re just building a single algorithm or subsystem as part of a course project / homework, there’s no need for pub/sub in the first place. You can note even when using ROS professionally, the planners / controllers / perception algorithms in Nav2 don’t use pub/subs internally anywhere, its only to get data in or out at the highest level.

1 Like

You may find this blog post interesting: “ROS, wherever you are”.

1 Like

I’ve only got access to university-managed workstations that students can use (walk-in computer labs), but they are very restrictive in terms of software. No WSL, no docker. I’ve tried VMs, but they are a pain to move from computer to computer (cannot rely on local storage) - and students need to copy it for home working, if they have a powerful enough computer to move a VM.

The need for pub/sub comes when using student codes in a simulator or in a real robot - I am preparing two different scenarios:

  1. Simulation - Using Webots and zeroROS I pub/sub to their control driver
  2. Real robot - Using RPi4 running zeroROS I use the same pub/sub topics to prove their algorithm in real conditions.

I can’t think of a way around pub/subs for there two scenarios - and I agree with you that internally, there is no need for pub/subs.

1 Like

As an experienced ROS developer and instructor, I am familiar with the challenges faced by students learning ROS, especially those with backgrounds in non-computer science disciplines who may not know simulation tools and software development concepts due to their curriculums.

Thank you @miquelmassot, @johnwason for your efforts to create libraries to allow an easier introduction without overwhelming students. I think that’s a great approach and similar to how I got introduced to programming.

@smac, I also agree with gradually introducing robotics software development concepts to students in robotics courses. Students should learn what is currently relevant to them, e.g. you should not be required to install Linux and understand ROS messaging if you are curious about the data stream produced by an IMU.

My take on lowering the entrance to robotics development are ROSbloX, https://rosblox.github.io/. ROSbloX are physical building blocks that enable students to compose robots. They require no installation and feature automatic connectivity and built-in web-based data visualization tools. The goal is to enable students to build their robots first and afterwards step by step understand the underlying technology.

Thank you all for sharing your experiences and insights. I am curious to hear your thoughts about ROSbloX to lower the entrance barrier to robotics development.

A good command of modern software engineering is a prerequisite for robotics education, I believe. Even coming from different disciplines, learning software engineering would be beneficial for students in their future careers, mainly because software eats our world more and more.

Yet I don’t think ROS itself is doing a good job in software engineering, as it still recommends practices from the 2000s. The ROS tooling has not been significantly changed from ROS1 to ROS2, and is outdated and undermaintained in many aspects. Hence I don’t find it worth teaching those tools and practices to new students as the software world has evolved somewhere else already.

Moreover, I am not in favor of hiding the inherent complexity of robotics with no-code or low-code platforms. Once the students leave the sandbox provided by the platform, they are all alone with the whole complexity. And they have to learn software engineering in any way. Therefore, the time spent on those platforms is not helpful in their future career. I can expand the same criticism to the ROS ecosystem as well. Tools used for the ROS are not helpful outside ROS. Hence I advise my students to learn general-purpose software engineering.

For teaching pub-sub, I may suggest starting with Zenoh, purely in Python. I use MuJoCo or Carla as the simulator in my classes. Both provide nice Python APIs that students can use with their Python knowledge using standard Python tooling.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.