jhavl / swift

MIT License
91 stars 21 forks source link

How to add own mesh object #17

Closed prajwalresearch closed 2 years ago

prajwalresearch commented 3 years ago

Hi newbie here, I working with robotic toolbox with swift as backend I wanted to ask few things. 1.Where does the mesh files of objects are defined ? Like for sphere , box .

  1. Is it possible to disable collision between two added objects like two spheres , box? 2.Is it possible to add own mesh/URDF objects in robotic toolbox +swift? Any help is appreciated. Thank you .
prarobinson commented 2 years ago

I've had success adding my own robot and accompanying meshes by mimicing the included examples. Collada/.dae files will be in rtb-data/rtbdata/xacro/[robot] _description/meshes/visual, and the xacro files will be under rtb-data/rtbdata/xacro/[robot] _description/robots. You'll also need to create a new [robot].py file in roboticstoolbox/models/URDF.

I don't know about adding arbitrary geometry, but would like to! For adding a cube or other primitive see the issue from March:

import spatialgeometry as sg from robotics toolbox.backends.swift import Swift s = sg.Sphere(radius=0.1, color) env = Swift() env.launch() env.add(s)