Rocksi icon indicating copy to clipboard operation
Rocksi copied to clipboard

other robots

Open feraco opened this issue 2 years ago • 2 comments

Hi, this is a great project!

I teach Computer science and science research. I would love to figure out how could i change this simulator to use a 3d car or drone simulator. Any advice would be great.

feraco avatar Nov 27 '23 19:11 feraco

Hi Fred! Thanks for the feedback :) That's not a trivial change, but it would certainly be doable. There are a couple of places to look into:

  • blocks: you will have to create some new blocks for the blockly UI to navigate your vehicle. Once you have defined a block, add it to the toolbox.
  • code generation: once your blocks are executed, they would need to create javascript code that updates the vehicle's position over time (could be fixed step size, a PID controller or any other kind of navigation). Have a look here for an example of how a single joint is moved.
  • robot loading: you may have to make some changes here as well, as I always assumed that the robot would have movable joints, but at the very least you will have to create a loader for your robot. If you don't want to tear up the entire loading logic itself, I suggest you use a vehicle where a URDF is available. A quick google search revealed this drone for example.
  • UI popup: you may wish to add additional elements here. You definitely should add your robot's name here so you can switch easily. Otherwise, loading your robot can be enforced by adding a parameter to the URL (as is done already, e.g. https://ndahn.github.io/?robot=Sawyer).

That's what I can think of from the top of my head. Adding new blocks and function is relatively straight forward and should be robust, so it mostly depends on if and how the vehicle can be loaded!

Let me know if you need anything else or have made some progress :)

ndahn avatar Nov 28 '23 03:11 ndahn

Ah, I'm not sure if this will actually work, but if the vehicle has a "world joint" you could add this as 2 or 3 1D joints in your robot loading logic. That way, you could use the already existing blocks, although the inverse kinematic might do some strange things with that... The approach above would definitely be the high road though.

ndahn avatar Nov 28 '23 03:11 ndahn