Skip to content
Kai von Szadkowski edited this page Mar 23, 2018 · 34 revisions

Operators are constructs in Blender that can be called from the GUI, thus whenever you click a button or menu item, you execute an operator. Thus while you can use lots of Phobos' functions when scripting in Blender, most of the time you will work with the set of operators it provides.

Model editing

Robot Model

Update Robot Model

This operator is deprecated and will be deleted soon. Please do not use it anymore.

Name Robot

This operator names a robot. You have to select at least one object parented to the robots root link.

Define kinematic chain

This operator defines a kinematic chain containing all selected object. The active object will be the chains end.

Toggle Namespaces

This operator toggles the selected objects namespaces. If complete is checked the whole selected robot will be toggled.

Inspect Robot

Measure distance

This operator calculates the distance between the

X-Ray view

This operator enables or disables the X-Ray view for a specified set of objects.

Check robot dictionary

This operator checks a robot against a set of rules and saves all suspicious objects into a list.

Select error containing objects

With this operator you can select objects detected by the Check robot dictionary operator and inspect it.

Selection(s)

Select Root

For each currently selected object, this operator selects the root link of the corresponding robot.

Select by phobostype

Selects all objects of a specified phobostype.

Select Robot

For each currently selected object, this operator selects all objects (including links, visuals, collisions, inertials, sensors and controllers) belonging to the robot the object is part of.

Object editing

Set phobostype

This operator sets the chosen phobostype for all selected objects.

Partial Rename

This operator is a simple way to do find&replace operations on your objects names. Be careful using it, because it doesn't respect namespaces and other naming conventions.

Set Objects to Layers

This operator sorts the selected objects to their corresponding layers. See Editing a model for more information about layers in phobos.

Edit Custom Property

This operator edits the specified custom property for all selected objects. If the new value is '' it deletes the property. Otherwise it sets it to the new value and even creates it if necessary.

Share meshes

Purpose

The selected objects will share the active objects mesh among each other. The overwritten meshes will be lost forever!

Parameters

shared Meshes Name

This is the new name for the shared mesh to use when exporting it.

Context Requirements

  • The active object must not have an already shared mesh
  • The active object has to be a visual or collision object
  • The number of selected visual/collision objects has to be >= 2

Copy Custom Property

This operator takes the active objects poperties and copies it to all other selected objects. You can choose to purge all other custom properties.

Undo Share meshes

Breaks the bond between the shared meshes. The objects will not get there old meshes back, but the meshes can now be edited and exported individually again. If you undo a sharing on a source object without undoing it on its adherents you may have problems with the mesh export later on!

Rename Custom Property

This operators takes all selected objects and renames a given custom property. You can choose whether you want to override existing properties or not.

Smoothen Surface

This operator takes all selected objects and applies the shade_smooth blender operator to them.

Edit Object Dictionary

This operator allows you to edit the active objects custom properties in the blender text editor. You can change the values as you want and even add or delete key-value pairs. If you hit the run script button the custom properties of the currently active object will be overwritten. So make sure you have selected the right one!

Kinematics

Create Link(s)

This operator creates links at the 3D cursors location or at the selected objects positions. You can choose to parent the newly created links with the selected objects and parent links.

Define Joint Constraints

This operator takes all selected links and applied the defined joint constraints to them. All URDF joint types are supported.

Create Inertial Object(s)

This operator takes all selected links and creates their inertial objects. You can choose to calculate them automatically or manually.

Attach Motor

This operator attaches the specified motor to all selected links. PID and DC motors are supported.

Create Collision Object(s)

This operator creates collision objects for all selected visuals. You can choose from a set of different primitives or to use visuals mesh. If you use the mesh option you can either copy the mesh for further editing or use the shared mesh option.

Set Geometry Type(s)

This operator takes all selected objects and sets their geometry types. It omits all objects that are no visual or collision objects.

Set Origin to COM

This operator sets all selected objects origins to their centre of mass.

Set Collision Group

This operator sets the collision groups for all selected collision objects. You can change the groups by just changing the bitmask visible in the operators properties menu.

Mimic Joint

Masses & Inertia

Show Mass

This operator shows you the mass of your selected objects

Sync Masses

Set Mass

This operator iterates over all selected objects and sets the mass specified in the parameters.

Edit Inertia

This operator takes all selected objects and sets their inertia data to the specified one. It omits non inertial objects

Sensors & Controllers

Add/Edit Sensor

Add Controller

Export & Import

Model Export Settings

path

This is where the model's destined export path is specified.

relative path

Selecting this check box will cause the specified export path to be interpreted as a relative path; otherwise the path will be interpreted as an absolute one.

decimal places

This value sets the number of decimal places used for representing floating point values inside the export files.

structural export

Selecting this option will sort the files generated during export into according subdirectories of the export directory. This may provide a better overview.

Mesh export

export meshes

If this check box is selected, the selected model's mesh objects will be exported into a separate meshes subdirectory. The files' format is set accordingly to which option was selected (see below). The selected format is displayed below the option check boxes.

use .bobj format

Selecting this check box causes the model's mesh objects to be exported in .bobj format, if the Export Meshes option was selected as well.

use .obj format

Selecting this check box causes the model's mesh objects to be exported in .obj format, if the Export Meshes option was selected as well.

use .stl format

Selecting this check box causes the model's mesh objects to be exported in .stl format, if the Export Meshes option was selected as well.

use .dae format

Selecting this check box causes the model's mesh objects to be exported in .dae format, if the Export Meshes option was selected as well.

Robot data export

Export Robot Model

Exports the selected robot to the specified path using the export setting selections. Only those parts of the robot that are currently selected will be exported.

Import Robot Model

This operator allows for browsing for either a MARS scene or a URDF file and importing the model specified inside it.

Baking

Bake Robot Model

This operator bakes the currently selected robot. It takes all visuals, simplifies their meshes and exports a single stl file to the export folder. It also creates a info.bake containing some information for the Import Robot Bake operator.

Create Robot Lib Instance

This operator creates an instance of a previous imported robot bake at the 3D-Cursors location.

Import Robot Bake

This operator imports a robot bake into blender. You have to choose the bake.info in the file selector window. From now on you can create an instance of this robot in every blender project unless you delete or move the original robot files. You can find a RobotLib.txt in your phobos installation path if you want to change the filepath manually.

Export Scene

Export SMURF Scene

Settings

Adjust Logging Settings

For a description of individual operators please refer to our source documentation.

Clone this wiki locally