-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce SMURFA-format #93
Conversation
'parent' defines frame of 'position' & 'rotation' 'anchor' defines second fixed joint node For both parameters the nodes are given in the way $ENTITY::$NODE You can set the following special values for anchor: - 'parent' to create a fixed joint to the parent node - 'none' to not fix this entity - 'world' to create a fixed joint to the world Parent accepts 'world', too, which is it's default value.
Set to WIP |
Loading another SMURFS into a first SMURFS now accepts If a SMURFA is included the superior |
In testing... |
Corrected the smurfloader in such way that the entities are loaded in the order the smurfs files have been written. It would be nice if it would load correctly independently from the order... --> To Do |
A further enhancement might be a field in a smurfa entry to define the type of the anchor joint. This also requires joint information, like limits and axis. This will be postponed until it is needed. |
@@ -115,6 +115,23 @@ namespace mars { | |||
// set the next free id | |||
jointS->index = next_joint_id; | |||
next_joint_id++; | |||
if (jointS->config.hasKey("desired_id")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the desired_id
really useful? The whole application should work too, even if the id is not free. So, why is the desired_id required? In most cases where new id's are generated, the desired ones are not free anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives the possiblity to separate the ids and give the model a clearer structure, if not needed it can just be skipped.
Now we can define robot assemblies similar to xacro.
This will solve issue #78
Changes
The following sections define the changes made.
Changes in Key parsing
We use new keys and define old ones new.
parent
defines the frame in whichposition
androtation
are given. So the FTS300 in the example below is rotated 90 degrees around the y-axis of the frame of theur5
entity'see_link
node.parent
's default value is "world"anchor
defines to which node we create a fixed link to mount the next part of our assembly.parent
's default value is "none"The node for
parent
oranchor
is always given in the way$ENTITY_NAME::$NODE_NAME
.There are a few special keywords that can be used as well:
world
: the world node/orignnone
(only foranchor
): no fixed joint is createdparent
(only foranchor
): a fixed joint to the node given as parent is createdSMURFA Format
Therefore we can define a
*.smurfa
file with the following exemplary content:In this example we have an ur5 robot, which is defined as the root of our assembly, by setting
root: True
.It is possible to define multiple roots in one file, but they will belong to the same assembly. The placement of the assembly via the
position
androtation
parameters in the higher-level scene will only be applied for root entities. Also make sure to define all non-root objects relative to a root usingparent
.The data_package entry defines how much data is sent to the DataBroker by the anchor joint. (0: none, 1: reduced, else or not given: full).
SMURFS Format
Old SMURFS files using the
anchor
can be used in the same way as before. SMURFS files usingparent
to define a fixation have to be adapted.We can include SMURFA files in a scene (see below). In this case - just as before when including a robot - you can define the position and rotation. Both are applied on the whole assembly, giving you the ability to place the whole assembly with those two parameters. Additionally you should give an unique name for your assembly.
SMURFS allows the usage of parent and anchor like in SMURFA, too, but the entities are not linked in an assembly.
ToDo
[Done] position and rotation (Exception:
what(): Item is of wrong type.
)Currently the application of the overall placement of the assembly is only possible if the root nodes
position
androtation
are given in the way:This is a problem while overwriting parts of the underlying configmap.
Done -> f6f0c09
[Done] zipped version of this format (ZSMURFA)
Currently the entity_factory for ZSMURFA is not defined.
-> Done with commit 1dbf3a4
[Done] Sort all loaded entities before creating them, so that one's entities dependencies are loaded beforehand.
-> Done with commit 16a33b1