Go1 Success with JS API

It took us far longer than anyone thought it would, should, or could, but we actually got our Code to run, and move the Go1!! We are still having problems connecting from a Virtual Machine and that will cause us problems programming low level, BUT we actually got our code to run on the Go1!

The mistake we were making was having the quad in the wrong mode. Once we saw that in the class file, we figured it out. We made a loop and had the Go1 walking on patrol in the room for a while.

I assume that the JS API does not allow access to the sensor data to program more than dead reckoning, correct? If it is, where can we find the methods for that?

Our next step is to solve the virtual machine connectivity problem and be able to code in the Ubuntu environment so we can install and run ROS for lower level control. Anyone having similar problems with virtual machine environments?

1 Like

What virtualization software are you using and what is your host OS? Happy to help out. I have not run into any specific issues with docker or WSL.

We’re running Virtualbox on a Mac all in one as host to Ubuntu Mate 20.04. We tried setting the Network setting to Bridged Adapter, which I thought would pass everything through the Host connection (WiFi connected to the Go1 SSID). We could ping from the terminal to the Go1, but sending code got no connection. The same code on the Host ran perfectly

Edit: I should specify the Mac is Intel based.

What example are you trying to run? I’ll give Virtualbox a try on my Mac this week.

I’m away from the machine over the weekend, so I can’t send the files till Monday but it was just the basic change the LEDs to start with. I will copy and paste the code from the json and the trial.js files into a doc, unless you know of a better way to get the code to you in a format you can easily check?

I should probably get the kids using git to control all these versions soon.

Getting the students using GitHub (or a git-based system) would be amazing. I’d be happy to assist and perhaps we should do a mini-course discussing how to use the the tool? One option would be to create a gist. I do that a lot when trying to share code snippets. Here are some I’ve created recently:

I already have an account with Gitlab from my CS courses this Summer so I went with that. Also, it’s unblocked at my school. This is going to be a small problem with having secondary schools access it. At least some IT departments will be queasy about opening up github.

HERE IS THE LINK

Oh, I would be remiss if I didn’t post the VIDEO!

I also added a video on LinkedIn for all my fellow CS & STEM teachers to drool over.

1 Like

That was awesome. Thanks for sharing the video! When I login to GitLab with my account I cannot access your code. Any chance you can make it public?

Well it shows as public so I’ll just post the package.json & the js file contents:

@I.TeachPolarBears Hi, when I try your link I get page not found in gitlab. Nice video.

So hopefully this works better. I think I might have put the Gitlab snippet inside of a private project so that might have screwed up the permissions. I started a fresh github project for this and set it to public so hopefully you can see it.
Also, @dbaldwin I think a lesson on git would be an awesome idea. What I know about it fits in a very small package and leaves plenty of room left over. It would be very helpful to hear from someone who uses it professionally and regularly.

Thanks to @I.TeachPolarBears help and @dbaldwin’s great video I was able to make this work. Everyday is a little breakthrough!

1 Like

This is awesome! I also need to know where you got that head from! It’s amazing!

@jleonard128 I 3D printed the head.



1 Like

Whoa! Could I get the files for that or a link to where to find them?

I bought the file here, and modified it. It’s held on with Velcro so I can remove it when I use the LIDAR.

1 Like

What I love about the velcro is it gives your Go1 a very realistic, bobble head, kind of vibe!

Yes, it was unexpected, but I do like the head movement. What is your next video going to be? Can you show some sample movements other than walking? Thanks.

Anxious to see what you come up with over the weekend! Go1 Push-ups while Monitoring Battery State