Go1 Push-ups while Monitoring Battery State

Check out the update to our Go1-JS library:

@Fritz please give it a try and let us know what you think!

With some help from @dbaldwin I got this to work. I appreciate trying something other than walking, and it was interesting to see how fast the battery power drops. Unfortunately, I was unable to get the obstacle avoidance example to run and get error messages. May be a problem with the type script.
https://youtu.be/-fmEmx_LgsA

We had an error pop up Friday that prevented us from running the push ups and battery script, but we also had limited time to try it so it could have been a syntax error. We’ll know more Monday.

I do have a Node question though. If you have already pulled from the NPM repository, how do you update that folder, or do you have to start from a fresh location?

Also, does anyone have any basic Node tutorials that are solid? It’s hard to tell if we’re having an issue with a javascript built in or something from the class file, and that makes troubleshooting much harder. It is on my list of things to do when I get a few minutes, but I haven’t investigated what the good resources are beside the Odin project.

In the package.json you need to add the line. “type”: “module”, Then it should work.

Also, I looked at the code for obstacle avoid and it had 6 errors, which were from the type script. I was able to fix them and get it to work. It is a great example, but too slow to be useful. Even at the slowest walk, the dog crashes into the wall. But the fact that I got it to work makes it a great success. Thanks @dbaldwin for doing these examples! Obstacle Avoid - YouTube

Hopefully we can improve the data frequency. There are some SLAM messages that I’ve seen, but only available to dogs with the 2D Lidar if I understand correctly. I would expect latency to a lot better in these cases, but we won’t know until we test. If your Lidar 2D or 3D?

Mine is the 2D Lidar. Maybe you can do an example that uses the ultrasonic sensors.

Good call. Let me dig and see what I can find out.

That would be great. By the way, did you see this before the Super Bowl. They are everywhere… :grinning: Super bowl dogs - YouTube