RVR Console

Here is the latest version of my console for the RVR.

Using the arrow keys the RVR can be driven. You can see the speed, velocity and locator changing.

Also note the motor temperatures are high. I ran it but held the tracks for the motors couldn’t turn. They got a little warmer than usual.

2 Likes

How does the locator look to you? Does it seem to track fairly accurately?

1 Like

Only done a little testing in a straight line of a meter. It looks good but can’t say, yet, that it is perfect.

Need to write a new program to do that testing.

2 Likes

Looks awesome to have for diagnostics. I am noticing a variation in what my RVR defines as 0 heading and would love a console application that reads out those values lol. What did you make this in?

1 Like

Coded in C++ on Linux. The display is done using NCurses.

I have reverse engineered the serial protocol digging into other code provided in the documentation. Plus a few helpful comments by the Sphero staff.

The code is in a Bit Bucket repository.It isn’t real friendly to build or compile. I intend to make it so but right now it is a work in progress.

1 Like

One of the comments by Sphero is that only the drive using a heading is controlled using a PID loop. The raw motor control is not.

2 Likes

I wish I knew c++, this would be perfect to build upon for my RTS inspired control interface! That said I think I can do it with the clientjs sdk they have provided, assuming it is more complete than the nodejs sdk’s swagger page. How long has this taken you?

edit: quick follow up, how many updates per second are you comfortably hitting? I think I’m hitting limits in how fast I can pull data which makes sense.

2 Likes

I started work on the reverse engineering when I got my RVR in mid-October.

The fastest streaming data is reported is every 30 msecs which I’ve been using without any problems. Other data I request at a slower rate but haven’t really tested how fast I can get responses. I’d probably use a multiple of 30 msecs.

2 Likes

That’s interesting. In my testing last night, a poll rate of 10 msecs was too fast and even 100msecs was preventing commands from reaching RVR. Maybe it’s a limitation on the Javascript SDK since you can hit 30 with your implementation. Interesting interesting. Why multiples of 30 if you don’t mind me asking?

2 Likes

The response rate on streaming data is 30 msec. The data should be consistent across all sources so having it at multiples of a base rate helps with that consistency.

I have not tested to see how fast I can get responses. I know I spew multiple requests within a msec and receive responses within 10-20 msec.

3 Likes

Oh okay awesome, thanks for the info!!!

Hmm maybe my raspberry pi zero w is hitting a limit and not the RVR on my end. Really helps to hear from others on what they’re capable of so I can better base my assumptions. What hardware are you rockin?

1 Like

Right now I’m using my desktop which is terribly fast. :grinning:

When I get to an onboard system it will be an Up Board which is an Atom quad-core at 1.55 GHz.

2 Likes

Wow that’s going to be hefty! What are you going to use to power it? I found my raspberry pi 3b+ is tripping a power draw limit from RVR power so I was thinking of bringing on an external power supply. Just not worth the effort with all this coding to do atm though!

1 Like

Tried a sample rate of 50 msecs down from 250 msecs, overloaded my Pi completely! I might have to examine an externally powered Raspberry Pi 3b+ sooner rather than later if I want to hit higher sample rates.

1 Like

The Up Board powers off the RVR. I set it up and measured the power usage to make sure. It’s been easier to work from the desktop. Hope to get some code running on the Up in the next week or so.

I’ve played with Pi Zeros so am surprised you’re hitting that wall. Even smaller processors like on Arduino’s can handle that bit rate but again that is C++.

2 Likes

I think it’s surprising too. What’s even more surprising is I’m only streaming locator and velocity data so it shouldn’t even be that chatty in the first place! The SDK does a lot per each signal so I really do think it’s just getting overloaded. 50 ms was too much but the RVR responded once I changed the rate to 150ms.

Wow you’re powering a quad core off rvr internal power? That’s awesome! Does it sound normal that a RPi 3b+ trips the efuse for draw limits, or am I doing something wrong there? I just really think I need the additional horsepower now. Especially knowing what you’re pulling off!

1 Like

Mounted the Up Board on the Rvr. Can communicate with it over Wifi. It runs Ubuntu Mate from a built in SSD.

I can run the console program on it over SSH. Can also access using VNC for the GUI.

And with the console I can drive the Rvr using the arrow keys.

Yes, I chased the cat a bit. But control is crude using the arrow keys.

1 Like

Wow, you’ve done amazing work, as always! What’s next? ROS package please? :grin:

1 Like