URDF Workbench, robotics

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
fosselius
Posts: 365
Joined: Sat Apr 23, 2016 10:03 am

Re: URDF Workbench, robotics

Postby fosselius » Mon May 15, 2017 4:02 pm

Gazebo/SDF wants the models to have its model origo at the center of mass.
This was just me getting my center of inertia at origo while the model had its origo at a random position (not center off mass or a corner).

I am not looking for a "perfect solution" i am only looking for an easy/fast way to test different mechanical links in gazebo.
I would like to design a passive dynamic walker and experiment with different mechanical linkage to generate different gaits ;)

I have looked at the blender plugin and it looks very potent, but that is not what i need.
User avatar
fosselius
Posts: 365
Joined: Sat Apr 23, 2016 10:03 am

Re: URDF Workbench, robotics

Postby fosselius » Tue May 23, 2017 8:53 am

I have managed to load exported a SDF with two links in Gazebo. Each body becomes a link. Its still very rough and the .stl export is not included yet.
But you can follow the progress here: https://github.com/maidenone/RobotCreator

There is not much to see yet and its not yet ready for testing.

Also the name is not that great, might be confused with the Robotic Workbench. But the "URDF or SDF" workbench is not entirely correct either, and "Gazebo workbench" is also not entirely correct.
User avatar
Kunda1
Posts: 8719
Joined: Thu Jan 05, 2017 9:03 pm

Re: URDF Workbench, robotics

Postby Kunda1 » Tue May 23, 2017 12:36 pm

Thanks for the update! 8-)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
fosselius
Posts: 365
Joined: Sat Apr 23, 2016 10:03 am

Re: URDF Workbench, robotics

Postby fosselius » Tue May 23, 2017 5:11 pm

ok, now we have a little progress
phpBB [video]
User avatar
fosselius
Posts: 365
Joined: Sat Apr 23, 2016 10:03 am

Re: URDF Workbench, robotics

Postby fosselius » Thu Oct 05, 2017 7:32 pm

Here is an small update, progress is slow as usual, but now i have something that can export to SDF with 3d shapes and joints.
Joints are created by selecting two objects and then running the "createHingeJoint" script that will create a joint object that keeps track of parent/child, position, orientation as well as initial angle of joint.
The "exportToSDF" script then later finds all the joint objects and inserts them as joints in the SDF file.
I actually had this done a few months ago, but have not bothered with the GUI work until now.
I have also looked a bit on BulletPhysics, Right now i export and simulate in Gazebo, but it would be more efficient to set upp Bullet to be able to run directly in FreeCAD as done here: https://github.com/JMG1/FreeCAD_BulletPhysics
It should not be much work as Bullet can import SDF and URDF directly, so next up would be joint control.
Screenshot from 2017-10-05 21-17-27.png
Screenshot from 2017-10-05 21-17-27.png (24.25 KiB) Viewed 1262 times
Screenshot from 2017-10-05 21-18-04.png
Screenshot from 2017-10-05 21-18-04.png (56.02 KiB) Viewed 1262 times
If i keep this up i will probably have something that looks/works well around 2020 ;)
User avatar
fosselius
Posts: 365
Joined: Sat Apr 23, 2016 10:03 am

Re: URDF Workbench, robotics

Postby fosselius » Wed Nov 01, 2017 11:31 am

I made a new video to better show the current status of the project:

phpBB [video]
rupkin
Posts: 1
Joined: Tue Jul 17, 2018 3:02 pm

Re: URDF Workbench, robotics

Postby rupkin » Tue Jul 17, 2018 3:22 pm

Hi fosselius!
Would it be possible to give a license to your project like BSD or MIT?
I'd like to test it but mustn't use it until it is licensed.
Thanks!
User avatar
fosselius
Posts: 365
Joined: Sat Apr 23, 2016 10:03 am

Re: URDF Workbench, robotics

Postby fosselius » Thu Jul 19, 2018 11:08 am

Its just a buch of lines of python. You can consider it "Public Domain". I am on vaccation at sea and have no access to a cumputer and only sporadic internet on my phone. I can add the proper licence docunent in the project once i get back.
Project is here:
https://github.com/maidenone/RobotCreator
Its in a very "hacky" state and might not work at all.

I started to play around with loading the URDF or SDF directly into pyBullet and render it inside freecad to be able to run the physics simulations directly in the same program. But i ran out of time and motivation.
I have considered to reimplement it based on realthunders assembly fork but are waiting for it to be merged into freecad master first which can take months if not years at the current phase.

Currently i think working on realthunders fork if is the best way yo spend my spare time and when the solver works well i can start with the robot "rigging, simulation and coding/control".

I would like to get something with as few dependencies as possible and not force users to install Gazeboo and ROS in order to do simulation or joint control. But i still want to have an easy workflow to modify sdf/urdf for use in ROS and Gazeebo if needed.
User avatar
Kunda1
Posts: 8719
Joined: Thu Jan 05, 2017 9:03 pm

Re: URDF Workbench, robotics

Postby Kunda1 » Fri Jul 27, 2018 12:55 pm

Interesting related robotics thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=10425 (Gypsy - A long term personal project for fun.)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features