Hacker News new | comments | ask | show | jobs | submit login
JPL Open-Source Rover Project Based on the Rovers on Mars (github.com)
324 points by ghosthamlet 6 months ago | hide | past | web | favorite | 67 comments

My coworker Liv designed that! I don’t know the original purpose but it’s a fun project.

I’ve also got my own open source Rover design if you like this kind of thing:


It’s very confusing having the frame rate of the camera and the rotation of the wheels in sync so that the wheels appear completely stationary while the rover drives forward.

Right! It was weird to watch when editing.

If you are interested in other open-source space technologies feel free to check out Libre Space Foundation's (https://libre.space) code repositories (https://gitlab.com/librespacefoundation/)

We aren't NASA or JPL but a non-profit based in Greece. We already run SatNOGS (a network of satellite ground-stations), UPSat (the 1st satellite with components mainly under the CERN Open Hardware License) and on the side we work on amateur high power rocketry telemetry and PocketQubes.

Awesome! Can I contribute? In other words, how can I, as an experienced backend developer (Java, Python, Scala, Ocaml, some C/C++) but a complete newbie in space, hardware and/or realtime systems, contribute?

Hey tomp. Of course you can. Most of our source code for SatNOGS is actually Python (and Django) and there is a lot you can do with C++ too. Check out our forums and don't hesitate to introduce yourself to the rest of the community https://community.libre.space/t/new-users-welcome/29/278 feel free to also hang-around over our IRC channels at the freenode server #satnogs Matrix bridged here https://riot.im/app/#/room/#satnogs:matrix.org or #librespace Matrix bridge https://riot.im/app/#/room/#librespace:matrix.org

Been following SatNOGS for a while now. Building on of the ground station designs has been on my to-do list for a while.

Recently checked in on the website and saw the building instructions have gotten better and much clearer.

Well we wouldn't have made it without awesome contributors helping us out. Don't hesitate to join us :D

if anyone has worked at JPL or similar, what's the best resource for learning how to make an actual Mars/Moon rover?

I'm very curious about things like, what kind of wheels you need for regolith, how to manage extreme temperatures (electronics, motors, batteries, cameras), how communication works (could you have a remotely-operated lunar rover?), dealing with radiation (SpaceX works with consumer electronics AFAIK, but they mostly fly within Earth's magnetosphere, which ... changes things).

Any replies or emails would be extremely appreciated.

Haven't worked in this field, but here are some episodes discussing the topic:







I think what you are talking about is mostly just normal engineering in the sense that the process is similar. What really makes space unique isn't space as such but that there is no real-world (real-space?) testing, no inspections after the fact or do-overs.

>I think what you are talking about is mostly just normal engineering in the sense that the process is similar. What really makes space unique isn't space as such but that there is no real-world (real-space?) testing, no inspections after the fact or do-overs.

This is sort of true?

Spacecraft of all types are subject to a battery of physical tests before launch. This includes vacuum testing, thermal cycling and vibration (where many parts fail). There are normally duplicate components produced for different purposes. Some are just for testing the fit, others are to check that thermal expansion isn't a problem and so on. The actual flight hardware itself is usually tested as well, since it's designed to be repeatedly stressed within certain physical limits.

NASA has duplicate rovers in the lab that commands are tested on. Before a mission plan is uploaded, it's tested on the ground system to make sure that, for example, an inspection arm doesn't collide with the body of the rover. Modern rovers like curiosity are reasonably good at self-inspection, since it can take a 360 selfie. The rover is covered with calibration points, for example to measure how much dust is covering things and how far the wheels have worn down.

A lot of "testing" is gained through experience. Satellite manufacturers know what designs work based on prior designs. NASA learns a lot every time they put a new rover on Mars. Rover missions (like Curiosity, Spirit/Opportunity, etc) tend to outperform their original specs because the engineering is so conservative.

In very rare cases astronauts have done in-space inspections - for example the repairs to Hubble. The ISS is also used as a space-based testing laboratory for hundreds of different projects.

(I've worked in a space science laboratory where satellites were routinely tested, and indirectly on rover data).

Sure. I would put that sort of more in the high level engineering than "real-world testing" though. I mean if you are Waymo you can drive around for a year and see what happens. If you are Audi you can still repair some fault after delivery and redesign the next model year. It is when you can't do that you need high levels of quality assurance, integration, fault tolerance etc. If anyone could teleport small objects to Mars it would soon be littered with smart phones in aluminium foil regardless of how harsh the environment is ;)

> What really makes space unique isn't space as such but that there is no real-world (real-space?) testing, no inspections after the fact or do-overs.

This is becoming less true today as engineering problems become more complex and simulation tools become more capable. Most automotive manufacturers have virtual models of their vehicles in testing long before the first nut meets it's bolt.

I don't work there but I do work at a place that supplies JPL with some of the tools they use to solve the problems you are interested in.


If you parse the user community and external repos you will find specific code & models for some of those use cases

https://github.com/search?q=matlab+rover https://www.mathworks.com/matlabcentral/?s_tid=gn_mlc

Do note that JPL also uses other tool chains, some open, with similar communities and repos. I'm not as knowledgeable to what extent they use these, ymmv (pun intended)


the fundamental point I would try to convey is that you can learn as they do - through trial and error via simulation.

While not quite actual rovers, NASA hosts the Robotic Mining Competition every year. [1] The gist of it is they're using a university competition to see lots of prototypes and innovative ideas. They can build a prototype every year or two, but they can see 40-50 ideas and how well they work at RMC.

Phil Metzger, a scientist who was at NASA Swamp Works for many years and is now in academia, has attended the competition every year. He also ended up at the top of Hacker News 4 months ago in an unfortunate situation. [2]

[1] https://www.nasa.gov/offices/education/centers/kennedy/techn...

[2] https://news.ycombinator.com/item?id=16723099

> could you have a remotely-operated lunar rover?

Yes. The Soviet Lunokhod program built and flew two successfully in the early 1970s. I don't know the details of how they did this, but it would make sense to use more automation today. A 2.6 second ping time is long enough that pilots who have played modern video games are likely to complain :).

I don't think ping is the problem... the problem is "line-of-sight"... Obviously, Earth rotates too fast, so you'd need to use a network of Earth-satellites getting the signal from the moon and transmitting it to the ground station. The other problem, maybe, is how to communicate... Can you have an antenna/laser on the rover itself, or would it need to transmit to a Moon-satellite first (e.g. to save weight on the lander)? How much energy do you need to communicate, can you do it continuously or do you need to "save" energy for a quick burst of radio signals every so often? Is there any other kind of interference (Moon regolith allegedly flies up to 100km above the surface)...

These are just simple issues that came to my mind. No idea how relevant they are, and if there are more relevant issues.

> dealing with radiation

I can at least answer this part of the question. (I have had NASA contracts working on radiation tech, though not in that sector currently)

You can use COTS. Just depends how reliable you want it. There's a good interview on EEV blog with one of the XPrize contestants. [0] He talks in detail about how they handle radiation (they basically don't and hope for the best).

If you have a mission critical design or are sending to a more extreme environment, like Mars, then you actually have to deal with radiation. Commonly this is done with rad hard chips. Instead of silicon they use sapphire. Sapphire is what is considered rad hard. Downside is that these chips tend to be older and not nearly as powerful as current technology. They will also encase more vital parts in tungsten (especially see Jovian probe designs). Good news is that there's lots of work being done to determine how to make COTS viable (also a LOT cheaper). There's plenty of NASA SBIR/STTR topics on the subject if you want to try your hand at it AND get paid! Note: many abstracts for proposals are public, so you can see what others are attempting.

As for LEO and MEO, again it depends on how mission critical you are. Companies like Planet Labs (LEO) don't really concern themselves with radiation (most cube sats don't). They will just reprogram their satellites or take the hit. Typically GEO satellites are very rad hard, because the nature of the mission is to be there a long time and it is extremely expensive to get into that orbit. Typically they go with the tungsten box and rad hard chip design.

On the ISS they do a fair amount of research testing shielding. But they are also concerned with debris. So while you may know about aluminum other materials that are good also include Kevlar and Spectra (Ultra High Molecular Weight PE: which is used in grocery bags). People are experimenting with doping these materials, interweaving, different layering conditions, and all sorts of things. Pretty fascinating (and frustrating) work. Hydrogens help get rid of neutrons but you need dense materials for neutrons AND everything else. Note: ISS is in LEO and though you'd get lethal dosages on extended stays with no shielding, rad levels are fairly low.

Btw, lots of this work can be done with only some basic understanding of particle physics and can be tested with open source tools like GEANT4[1]! (there are better non-open source tools) Since it is one of these extremely large solution spaces, who knows, you might get lucky! You can play around with different low density materials (like plastics) and high density materials or metals. Goal is light, cheap, and effective.

[0] https://www.youtube.com/watch?v=nJLOZDPTp3I (3? episodes. There's a few)

[1] http://geant4.web.cern.ch/ (this is difficult. I do have some tutorials if anyone is interested)

P.S. I can also talk about some of the other stuff, but in less detail since it wasn't my focus. But figured this was long winded enough. Let me know if there is more interest.

A few comments - I'm not American, so my best shot is probably to find ESA projects equivalent to SBIR/STTR (if any exist). Yeah Kevlar seems awesome, I didn't realize it has such a huge range of operating temperature! (probably the same goes for Spectra/Dynema, but I didn't immediately find any specs).

Thanks for everything! There's definitely more interest! I'm now going through all the links everybody posted, and all the other resources I've found... I'd be happy to chat more, here or over email (in my profile). I'm also researching other things, like engine control, comms, etc. until I know what to focus on.

This seems really awesome, but my God is it expensive. Maybe I am not reading correctly but it seems like just the nuts and bolts from McMaster cost $230 and that's still excluding the electronics and additional hardware! I guess I'll have to save up a bit before I can play with my own minituare rover.

edit: the motors also are going to cost around $500

Regarding the motors, they wouldn't be suitable for this particular project but you can buy broken hoverboards really cheaply. Where I live you can get stripped ones (no battery, no logic board, but you can get hoverboard logic boards on AliExpress for under 20€) for 10€ and returned ones (99% of the time it's a dead battery) for 35€. The motors are fantastic and powerful (~350W each), and you can build lots of stuff with them. There's a great talk on how to use these things to build all kinds of moving objects (armchairs, bobbycars, motorised cargo carriers: https://twitter.com/JanHenrikH/status/1023218344282021888, ...) at https://www.youtube.com/watch?v=qnQSL9DBPaE. You can motorise anything this way for around 100€. The only thing that's hard to come by cheaply is the battery.

> The only thing that's hard to come by cheaply is the battery.

Dead laptop and power tool battery packs usually have at least some useable 18650 cells in them. A friend has built more than one battery pack for electric scooter out of harvested cells.

You do have to know what you're doing when working with unprotected cells though.

Yes it's easy enough to get unprotected cells, but the hoverboard batteries usually have short circuit and undervoltage protection, both of which are very nice to have as a beginner. If you know what you are doing you can also get RC hobby batteries for not too much money.

Hmmm... so I can see you haven't tried to build a practical robot lately. $2500 is approximately nothing for a robot that has the specs of this one. Sure, I've built $10 robots and $80 robots. But they don't do what this one does.

Yeah they list the cost as < $2,500.

That's a little pricey for most. But I'd imagine a school class would be able to afford that if it was going to be worked on by 30 - 40 students?

You can source nearly all of this for about half the price if you look around a bit and substitute some of the parts for cheaper equivalents. The wheels are a great example. You can pick up the same things from China for half the price or even use a different style. The motor drivers are pricey for what they are and could be replaced with many other, cheaper drivers.

It's really not too bad. To buy a 4WD all-terrain kit from somewhere like SuperDroid Robots costs around $1500-2000 without any kind of automated control system. That will get you four motors with encoders, batteries chassis, wheels, a good (Roboteq) motor controller and an RC kit.

The one we had at work could easily drive with a large adult (i.e. 80+ kg) sitting on it.

I mention SuperDroid because their chassis are high quality welded aluminium, chain driven wheels etc. They sell to hobbyists (robot wars) and industrial markets including law enforcement.

Most of the markup is on the frame. If you have acess to a welder and something to cut aluminium you could do it a lot more cheaply. And yes, high quality motors with encoders cost $150 each. As always, you can go cheap as a hobbyist and pay with your time.

If you want something semi autonomous you can buy a Clearpath Husky for about $20k.

Consider cost per number of hours of your time this project this will occupy. It's probably around that of other common pass-times.

McMaster is extremely overpriced. Good for just ordering stuff for quick prototypes where you don't need to shop on price, but otherwise, it's easy to end up paying multiple times as much for some item as you would if you found a good OEM supplier for each component (and this isn't even considering Chinese OEM suppliers).

I just recently learned about McMaster and noticed it's overpriced, but I don't know where else one would get all this variety of equipment. Where can I find such OEM suppliers?

Plus they have CAD models of nearly all their products. It's saved me hundreds of hours over the years.

This was my reaction as well, however I do appreciate the reasons for the expense. I'm curious if a "lite" version of this could be made for home hobbyist tinkering.

I agree a "lite" version for home hobbyist tinkering would be fun, here's my effort to make one: https://github.com/Roger-random/Sawppy_Rover

I'm sure there are many other versions, created by rover-loving hobbyists around the world.

you think $2500 for a bot is a lot?

https://www.robomaster.com/ , Chinese national robot competition with almost 200 teams competing each year, runs ~$10K bot teams, and those are build mainly from off the shelf DJI components.

This is great. But it's a little discouraging to see the project only use the US Customary units considering this is a science project. I was under the impression that NASA used SI.

It's more common than you'd think - I remember sitting in a talk in college by someone from Scaled Composites (they did SpaceShipOne etc) and they had said that they use inches everywhere.

Wasn't the conversion, or lack thereof, the problem with one of the Mars rovers some years back? The one that landed on the surface, rolled off the pad and died. I'm sure someone here knows more details about it, but I remember it being something about the teams not converting correctly/at all between the two systems...

You are thinking of the Mars Climate Orbiter crash:


>I was under the impression that NASA used SI.

NASA is a very large organization with thousands of different projects ongoing at any given time. For many smaller projects like this, it's really up to the whim of the project lead what unit system is used.

I think it's aimed at students, schools etc. Its purpose should be to attract people to science so it has to be less intimidating, hence the choices of the Raspberry PI or the phone app or the Xbox gamepad to control it.

It's a weird world where kids are more scared of the metric system than they are of a credit card-sized Linux computer with its guts showing.

It probably is just a matter of being used to it. In the EU we are used to the metric system, but are ok with screen or hard disk sizes expressed in inches to the point if some brand advertising offered a 1.5 meter wide screen TV most of us would look for a calculator to make the conversion, including myself. If we changed to the metric system also for TV sizes, most people would find it uncomfortable at first, but probably would adapt in months.

In my experience, Xbox controllers are actually fairly common for large robotics. It is relatively cheap to buy a controller and USB wireless dongle plus there are lots of software libraries to help interpret controller input.

My main experience being my participation two years in a row in the Intelligent Ground Vehicle Competition (IGVC). A college competition to develop self-driving rovers and "cars" (golf carts). There were around 40 teams from various colleges (several international, not just usa) and many of the teams used xbox controllers for manual control including my team.

The fact that this level of work is given away for free with the intent of making the world a better place makes my heart dance.

I am so optimistic for the future of humanity.

It's interesting that the rover code itself is written in python. That makes it more approachable..

You can be 100% sure that no python code is on Mars. Not even Common Lisp which is much more secure and performant is on Mars.

The real rover code is all hardcore C. Erann Gat gave a presentation on the Lisp Conference about the JPL rover code and simulation.

I'm a bit disappointed they're not using Forth.

Have they used/possibly still use Ada?

import rover

This is beautiful, and a wonderful project to develop along with some friends. JPL nailed it.

Man I hope someone like Massdrop can find a way to source these parts a little cheaper. It seems to me that there has to be a way to build this thing for at least half that price.

How difficult would it be to add a self-leveling platform to a vehicle like this ?

I have seen open source self-leveling two wheeled platforms (segway without the yoke) but I have not seen a self leveling platform on a 4-6 wheeled vehicle like this one ...

A mix of Python and Java regarding the software stack.

Python? God riddance! The real rover code was in C, and the simulator in lisp.

Looks more like a toy rover project, rather than "an open source rover project". Hoped they will make open source substantial (even if simplified) part of the rover project, so space startups can reuse and improve it.

The mars rovers run on hardened CPU’s that cost 200k per board, as well as a commercial OS, so creating an open source community around that would be challenging.

Hardened CPUs shouldn't be a problem, as long as you can also run the code on a normal CPU, or in an emulator.

having a 15 year old mac as a requirement is probably not the best

How is having a 15 year old mac a requirement for running Qemu?

Why couldn't this be re-used to some degree for a rover in non-Earth with tougher, more resilient hardware?

The hardware we use for non-earth stuff is effectively arduino-level (ok, maybe not exactly - but on the order of 70-100Mhz) because of the constraints put upon it by the radiation hardened hardware. Writing python is a trade-off between computer resources and developer time; we've got a lot of developer time and not a lot of hardware resource, so we write in compiled languages.

There are also some safety implications centered around determinism etc which mean interpreted languages are a bit more gray area; with a well understood compiler and language you understand what the code is doing better, and you know it will run the same every time. That may be the case with python if you understand the whole shebang, but not that many people do... And if you have that level of knowledge of python, you may as well be writing C or C++.

Do you find C/C++ acceptable from a safety/reliability perspective, or do you write in safer languages (Fortran, Ada)?

AFAIK critical software coding standards forbid dynamic memory allocation, so things like stack overflows, null dereference or out-of-memory errors can't happen, but array-out-of-bounds exceptions can still get you. On the other hand, static verification tools catch most of that.

C/C++ is fine as long as you adhere to coding standards like MISRA and you thoroughly test it. Our code for example, is unit tested, then we have java tests running on a server-based simulator, then other independently written java tests running on test benches that more closely represent the spacecraft itself, then a replica of the spacecraft.

The industry used to use Fortran / Ada quite extensively, and depending on company/organisation and team, might still do so. Things like the F-35 are written in C++, which is where I can see these things heading.

Safety critical standards indeed forbid memory allocation usually. If you want more details you can search for MISRA C (automotive market), the standards can be found online.

That being said, stack overflows and null derefs are not caused by dynamic memory allocation, so you still have to be careful about those and use some other rules / tools to protect you.

has JPL ever investigsted alternative real-time systems? say a real-time ML (as in sml, f#, etc.)?

Rover management was against anything modern or dynamic. They only trusted proven technology. Even if it was hardened C.

Because it’s made out of consumer bits and pieces that talk on serial bus with little or no environmental protection (with electronics and sensors distributed in a way that’s probably not practical to do so to the level required).

For non-earth you’d probably just want to start again.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact