Best way to give Nodejs SDK feedback?

Hello! I just received my RVR and have paired it with a Raspberry Pi Zero W utilizing Nodejs for an RTS inspired control system I am developing. After exploring Swagger a bit and poking and prodding the RVR, I’ve noticed a few issues with the SDK. As far as I can tell, the RVR is functioning normally, but for instance:

  • On the driveControl/turnLeftDegrees endpoint, the model requests a heading and an amount. Thus far in my testing the heading value is unused, and the amount directly corresponds to the heading the RVR faces.

  • The ledControl/setAllLedColor endpoint returns a 404. Edit: Many other endpoints 404 as well. After doing some digging it looks like Swagger is not accurate. sensorControl/startStreaming in Swagger needs to be sensorControl/startSensorStreaming for instance.

  • Its a little difficult to find out what the target IDs for the endpoints are. Its here plain as day, but it was nearly impossible to find in the API spec without knowing what I was looking for.

These are just a few things I’ve found in my initial day with it. I’m a front-end software developer and I might be able to help with some of this stuff, but I am too new to know the right avenue to reach out. Is the Github repo monitored for issue requests? Is there a good community wiki going? Is this the frontline? Really excited to dive into this and cant wait to team up with anyone I can!!!

2 Likes

Hey Eric!

Thanks so much for bringing these issues to our attention, and I’m glad to hear you’re so excited about getting to work with your RVR! We’ve started to look into the problems you’re seeing and we’ll get back to you as soon as we figure out what’s up. In the meantime, is there any code you could send our way to help us reproduce these issues?

To answer your other questions, this Community Forum and our GitHub repos are both good places to reach out! If you’re going to use both (which it looks like you have :wink:) it might be helpful to other users if you posted a link to the other site as well. But either way, we do have people monitoring both locations and we’ll try to get back to you as soon as we can!

1 Like

Better than just code, I can give you reproduction steps!!! All of this assumes you have a running copy of the Sphero SDK for Nodejs on Raspberry Pi and know how to access it on your network.

  • Run the server (sudo yarn start in the root directory of the sdk if you use Yarn)

  • Open your web browser to http://{{Raspberry Pi’s ip address}}:2010/api-docs to access the Swagger page.

  • Open the driveControl/turnLeftDegrees or driveControl/turnRightDegrees endpoint, press “Try it out” and set the body to { "heading": 0, "amount": 90 }

  • Execute, and observe that the unit treats the amount as the heading.

Turns out the heading is used if you leave amount set to 0 as well, I was was just new and wasn’t sending the placeholder 0 for amount and got 500 errors. Works kinda weird to me but I guess the heading -> amount interaction isn’t really a problem… moving on to important stuff!!!

  • Turn your attention to the /sensorControl/startStreaming endpoint. Open it up and try it out. Set your body to { "sensors": [ "Locator" ], "interval": 50 } and execute.
  • Observe that the server throws a 404 error because the actual endpoint is sensorControl/startSensorStreaming.

Same for sensorControl/stopStreaming -> sensorControl/stopSensorStreaming. Same for:
/ledControl/setAllLedColor, /ledControl/setAllLedRgb, /ledControl/setMultipleLedColor, and a few others but I don’t know what they should be.

I feel a good Swagger page is some of the best documentation you can have and it helps as a development tool too. I guess the main take away here would be: Is there any chance you guys can update the swagger.json file to have accurate endpoints please? Sorry for the sorta false alarm about the first part, that said that is a very weird interaction.