Asked — Edited

3Ds Max To ARC To Stepper Driver(S) To Nema 17S

Alright, kind of a tall order but here is where I am at and would love some help or points in the right direction from the community.

I'm building a machine with crazy unusual kinematics. I have 4 typical G9 tower micro servos and 13 separate nema 17's. Due to the nature of the machine, they had to be steppers ( which is unfortunately where the complication starts. )

I have Dual L6470 Stepper motor controller driver boards. each handles two steppers over SPI, which is sweet. attached is the datasheet and schematics.

Now I've animated the CAD model I made to print my parts via Auto Desk on 3Ds Max and used to mo-cap data to manually set key frames and such to get the machine to move exactly as desired in the animation.

Here's where Im starting to hit a wall. Original intention was to use 3Ds Max to inform ARC what to move and how much. I saw a member of the community already working on it. Then once I have my model in ARC with its new positional data, send that over to the boards through a micro-controller like the ezB4 or Rpi3 or something. I've gotten stuck on multiple points and would love some advice, either on solving these problems or alternate solutions?

Basically I have a machine with no feasible nor timely way to work out kinematics, an animation of that exact machine moving exactly how id like the physical machine to move, Id like to use the animation to tell the nemas and servos how much to rotate and how fast by simply having it reproduce the movements of the animation after Ive set the points then take that and run it through the hardware to the actual machine which is made and waiting dumbly to be told how to move.

info needed:

  1. method for uploading my model to ARC and using 3ds max to program motion.
  2. method for taking that data and relaying it to boards/nemas.

not really an expert in this field, have an electrical engineer working with us but due to a deadline he is swamp with other aspects so yeah, thanks again.

I should add, the nema's all need to work independently from each other as each control an entire axis of movement. I haven't said exactly what the machine is for 2 reasons 1) it doesn't impact how well the question can be answered and 2) Im not allowed to.

Id really appreciate any help on this, any part of it and and pointers or suggestions ! thank you.

Stepper-Controler.pdfdSPIN.pdf


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

PRO
Synthiam
#1  

What you want is the Auto Position control from ARC. Voila! Here’s the link: https://synthiam.com/Tutorials/Help.aspx?id=180

#2  

Thanks Dj sures, I already planned on doing that. great work btw. its just not very feasible to manually enter every joint key value from every frame for several dozen frames. ARC is the closest Ive ever seen to making programming a NEW robot (especially one with alien kinematics) as easy as key frame animation. There are a bunch of them available with proprietary software to run 5-6 axis robot arms but the same can be done to a totally different kind of robot in theory with user WBS00001 already having done some of the scripting . I think it'd be an amazing plugin or something to 3ds Max to export animation data to control ARCs model. That way, for those that are willing to take the time to learn 3ds-max or something they can program machine movements even off of public Mo-Cap data or something. It opens up many avenues for innovation.

Anyway, I stayed up late looking for a solution and think found one. Anyone in the community can maybe tell me if there is a flaw or better solution?

okay so I'll use a python/max script to take key values of joints in my animations in real time then automatically enter that data set per frame to the Auto Position control which will spit out UWP code that I can run on a pi configured to control 13 stepper IC's via SPI. Does that sound crazy? or is it really as straight forward as this give or take? Anyone have a different solution? any flaws? stress confused :P

PRO
Synthiam
#3  

If you can give me an example output of the 3ds max export, I can look into creating an import plugin for you.

#4  

The. Absolute. Man.

anyway, absolutely. Gotta get home from my day job to get that data for you but hopefully its feasible and people can then do even more cool stuff. Once Im allowed to talk about it I'll post it to show what was done thanks to ARC.

PRO
USA
#5  

@dj that would be a game changer. But I think it should be for MotionBuilder. MotionBuilder takes animation from any 3d package or mocap and allows you to edit and splice together animations smoothly. This is owned by Autodesk who also own 3d studio max, maya etc. then animations could be shared in the .fbx format.

@ramon3141 this is something I’ve been struggling with for a few years. I’ve been coming from a self taught cgi back ground except mine is with lightwave. But the concept of using an animation package to create motions has been a 30+ years dream.

But what I can share is this link to a thread on the discussion I started 2 years ago: https://synthiam.com/Community/Questions/8392

PTP at my request built a POC plug in to control Perception Neurons Motion capture devices. I’m in the process of getting one of their new mo cap suits to transfer motion to full body robots.

https://synthiam.com/Community/Questions/10286

..and there is a Kinect plug in as well.

PRO
Synthiam
#6  

Give me an example FBX file. Not any random one you find. A real FBX file generated from your real robot model. An FBX of some guy walking down the street or a pot moving on a desk doesn't help. I need an actual real FBX file of your real robot doing real things. I'll make a plugin import that data.

PRO
USA
#7  

I know @mickey666mous has a JD model and an animation set up in 3D max. He can export the scene in .FBX.

If he doesn't chime in soon, I'll create one for you.

#8  

alright, hold on. I'll tell someone on my team to send it to me so I can get you that fbx file.

#9  

ugh the only fbx we have is the one for the machine. DJ Sures anyway I can send this to you without posting it to the world. I can get in some trouble if I do unfortunately :\ I can send it now but if thats too much of a hassle then hopefully @mickey666mous or @fxrtst will provide you with one. Otherwise I'll make a JD tonight.

other option is i post it and as you as you confirm I edit my post to remove the file, at least until im given the go ahead and then I'll do a whole thing about it and ARCs role etc.

#10  

here is a possible implementation of the collecting positions in world coordinate system (absolute values)):



struct JointPos (time, pos) 
struct JointData (node, name, positions = #()) 

fn collectJointPositions joints range: = 
(
	if not iskindof range Interval do range = animationrange
	
	data = for joint in joints collect (JointData node:joint name:joint.name)
	
	for t = range.start to range.end do at time t 
	(
		for d in data do append d.positions (JointPos time:t pos:d.node.pos)
	)
	data
)

/* make a test scene **********/

delete objects
seed 0
joints = for k=1 to 10 collect (point pos:(random -[10,100,100] [0,100,100]))
animate on at time 100 in coordsys world  
(
	move joints [100,0,0]
	about [0,0,0] rotate joints (eulerangles 90 0 0)
)

/* collect the data **********/
data = collectJointPositions joints 

and to restore the animation data to import into the controller might be something like:


/* reset scene and restore animation per frame *******/

deletekeys joints
joints.pos = [0,0,0]

/* restore data **************************************/

animate on for d in data do
(
	for p in d.positions do at time p.time d.node.pos = p.pos  

but apparently the way the data is stored is not the best way it is retrieved.

maybe this can help as well. Like I said, im not a coder. I do the biomechanics work for this machine we're working on to help with rehabilitation of stroke victims and such people. I thank again DJ and the community for helping me out with this and look forward to people using this plug in to make this platform even greater than it already is.

attached is a google drive link for the FBS file for an early concept iteration of this robot, should suffice without getting me sued lol

PRO
Synthiam
#11  

Okay - I’ll take a look at this. I’m hoping that parsing the fbx gives me degrees of each joint over time. That would be easiest. Guess I’ll see what the file looks like as I get into it.

About to jump on a flight so I’ll have to look in detail later

#12  

You are a killer CEO man. Creating customer loyalty like a boss. Ive signed up for the evangelist team thing because more people need to know about what you're doing man. appreciate it. happy flying! now that you have the .fbs file if you dont mind im going to kill the link. thanks again. :D

PRO
Synthiam
#13  

These two threads are causing confusion - because there's duplicate information and a duplicate request.

Here's the other thread: https://synthiam.com/Community/Questions/9594

Take a look at my response in that thread - I believe WBS was onto something and that his method is the most dynamic way to accomplish that.

I don't know how to use 3DS - and i guess my question is, can you define servos in it? How does that work? Or are joints defined as joints? And they can be given names? I'm unsure how to identify what a joint is in the scene . According to WBS' code, he can FOREACH through objects defined as "servos" but i don't know how that is.

Will the FBX have a list of servos and a timeline? I'm thinking WBS' code is the best solution because it exports a list of joint degrees which translates into servo degrees to a file by frame. The challenge was his implementation didn't have a plugin, so it wasn't able to import into ARC easily.

I can make a plugin that imports the expert from his Max Script easily