Skip to content

Instantly share code, notes, and snippets.

@allsey87
Last active July 25, 2016 03:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allsey87/f12492573e5cadcb135e9a2e07f0ccc0 to your computer and use it in GitHub Desktop.
Save allsey87/f12492573e5cadcb135e9a2e07f0ccc0 to your computer and use it in GitHub Desktop.
ARGoS Definition of the Smartblock
<prototype id="smartblock">
<body position="0.0,0.0,0.01" orientation="0,0,0"/>
<bodies reference_body="block">
<body id="block" geometry="box" size="0.055,0.055,0.055" mass="0.25">
<offset/>
<coordinates/>
</body>
<body id="magnet_tq1" geometry="sphere" radius="0.003" mass="0.001">
<offset position="0.0225,0.0225,0.047" orientation="1,0,0"/>
<coordinates/>
</body>
<body id="magnet_tq2" geometry="sphere" radius="0.003" mass="0.001">
<offset position="-0.0225,0.0225,0.047" orientation="1,0,0"/>
<coordinates/>
</body>
<body id="magnet_tq3" geometry="sphere" radius="0.003" mass="0.001">
<offset position="-0.0225,-0.0225,0.047" orientation="1,0,0"/>
<coordinates/>
</body>
<body id="magnet_tq4" geometry="sphere" radius="0.003" mass="0.001">
<offset position="0.0225,-0.0225,0.047" orientation="1,0,0"/>
<coordinates/>
</body>
<body id="magnet_bq1" geometry="sphere" radius="0.003" mass="0.001">
<offset position="0.0225,0.0225,0.002" orientation="1,0,0"/>
<coordinates/>
</body>
<body id="magnet_bq2" geometry="sphere" radius="0.003" mass="0.001">
<offset position="-0.0225,0.0225,0.002" orientation="1,0,0"/>
<coordinates/>
</body>
<body id="magnet_bq3" geometry="sphere" radius="0.003" mass="0.001">
<offset position="-0.0225,-0.0225,0.002" orientation="1,0,0"/>
<coordinates/>
</body>
<body id="magnet_bq4" geometry="sphere" radius="0.003" mass="0.001">
<offset position="0.0225,-0.0225,0.002" orientation="1,0,0"/>
<coordinates/>
</body>
</bodies>
<joints>
<joint id="block:magnet_tq1" disable_collisions="true">
<frames>
<frame body="block" position="0.0225,0.0225,0.050" orientation="0,0,0"/>
<frame body="magnet_tq1" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
<joint id="block:magnet_tq2" disable_collisions="true">
<frames>
<frame body="block" position="-0.0225,0.0225,0.050" orientation="0,0,0"/>
<frame body="magnet_tq2" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
<joint id="block:magnet_tq3" disable_collisions="true">
<frames>
<frame body="block" position="-0.0225,-0.0225,0.050" orientation="0,0,0"/>
<frame body="magnet_tq3" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
<joint id="block:magnet_tq4" disable_collisions="true">
<frames>
<frame body="block" position="0.0225,-0.0225,0.050" orientation="0,0,0"/>
<frame body="magnet_tq4" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
<joint id="block:magnet_bq1" disable_collisions="true">
<frames>
<frame body="block" position="0.0225,0.0225,0.005" orientation="0,0,0"/>
<frame body="magnet_bq1" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
<joint id="block:magnet_bq2" disable_collisions="true">
<frames>
<frame body="block" position="-0.0225,0.0225,0.005" orientation="0,0,0"/>
<frame body="magnet_bq2" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
<joint id="block:magnet_bq3" disable_collisions="true">
<frames>
<frame body="block" position="-0.0225,-0.0225,0.005" orientation="0,0,0"/>
<frame body="magnet_bq3" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
<joint id="block:magnet_bq4" disable_collisions="true">
<frames>
<frame body="block" position="0.0225,-0.0225,0.005" orientation="0,0,0"/>
<frame body="magnet_bq4" position="0,0,0.003" orientation="0,0,0"/>
</frames>
<axes>
<axis direction="x" mode="angular" range="unconstrained"/>
<axis direction="y" mode="angular" range="unconstrained"/>
<axis direction="z" mode="angular" range="unconstrained"/>
</axes>
</joint>
</joints>
<devices>
<electromagnets>
<electromagnet body="magnet_tq1" passive_field="0,0,2"/>
<electromagnet body="magnet_tq2" passive_field="0,0,2"/>
<electromagnet body="magnet_tq3" passive_field="0,0,2"/>
<electromagnet body="magnet_tq4" passive_field="0,0,2"/>
<electromagnet body="magnet_bq1" passive_field="0,0,2"/>
<electromagnet body="magnet_bq2" passive_field="0,0,2"/>
<electromagnet body="magnet_bq3" passive_field="0,0,2"/>
<electromagnet body="magnet_bq4" passive_field="0,0,2"/>
</electromagnets>
<barcodes medium="apriltags">
<barcode id="top" body="block" localizable="true" position="0.000,0.000,0.056" orientation="0,0,0" payload="255" side_length="0.024"/>
<barcode id="north" body="block" localizable="true" position="0.0285,0.000,0.0275" orientation="0,90,0" payload="255" side_length="0.024"/>
<barcode id="east" body="block" localizable="true" position="0.000,-0.0285,0.0275" orientation="0,0,90" payload="255" side_length="0.024"/>
<barcode id="south" body="block" localizable="true" position="-0.0285,0.000,0.0275" orientation="0,-90,0" payload="255" side_length="0.024"/>
<barcode id="west" body="block" localizable="true" position="0.000,0.0285,0.0275" orientation="0,0,-90" payload="255" side_length="0.024"/>
<barcode id="bottom" body="block" localizable="true" position="0.000,0.000,-0.001" orientation="0,0,180" payload="255" side_length="0.024"/>
</barcodes>
<leds medium="leds">
<led id="top_a" body="block" position="0.000,0.020,0.056" color="blue"/>
<led id="top_b" body="block" position="0.020,0.000,0.056" color="blue"/>
<led id="top_c" body="block" position="0.000,-0.020,0.056" color="blue"/>
<led id="top_d" body="block" position="-0.020,0.000,0.056" color="blue"/>
<led id="north_a" body="block" position="0.0285,0.000,0.0475" color="green"/>
<led id="north_b" body="block" position="0.0285,0.020,0.0275" color="green"/>
<led id="north_c" body="block" position="0.0285,0.000,0.0075" color="green"/>
<led id="north_d" body="block" position="0.0285,-0.020,0.0275" color="green"/>
<led id="east_a" body="block" position="0.000,-0.0285,0.0475" color="blue"/>
<led id="east_b" body="block" position="0.020,-0.0285,0.0275" color="blue"/>
<led id="east_c" body="block" position="0.000,-0.0285,0.0075" color="blue"/>
<led id="east_d" body="block" position="-0.020,-0.0285,0.0275" color="blue"/>
<led id="south_a" body="block" position="-0.0285,0.000,0.0475" color="red"/>
<led id="south_b" body="block" position="-0.0285,-0.020,0.0275" color="red"/>
<led id="south_c" body="block" position="-0.0285,0.000,0.0075" color="red"/>
<led id="south_d" body="block" position="-0.0285,0.020,0.0275" color="red"/>
<led id="west_a" body="block" position="0.000,0.0285,0.0475" color="blue"/>
<led id="west_b" body="block" position="-0.020,0.0285,0.0275" color="blue"/>
<led id="west_c" body="block" position="0.000,0.0285,0.0075" color="blue"/>
<led id="west_d" body="block" position="0.020,0.0285,0.0275" color="blue"/>
<led id="bottom_a" body="block" position="0.000,0.020,-0.001" color="red"/>
<led id="bottom_b" body="block" position="0.020,0.000,-0.001" color="red"/>
<led id="bottom_c" body="block" position="0.000,-0.020,-0.001" color="red"/>
<led id="bottom_d" body="block" position="-0.020,0.000,-0.001" color="red"/>
</leds>
<radios>
<radio medium="nfc" id="top" body="block" localizable="true" position="0.000,0.000,0.050" orientation="0,0,0" range="0.020"/>
<radio medium="nfc" id="north" body="block" localizable="true" position="0.0225,0.000,0.0275" orientation="0,90,0" range="0.020"/>
<radio medium="nfc" id="east" body="block" localizable="true" position="0.000,-0.0225,0.0275" orientation="0,0,90" range="0.020"/>
<radio medium="nfc" id="south" body="block" localizable="true" position="-0.0225,0.000,0.0275" orientation="0,-90,0" range="0.020"/>
<radio medium="nfc" id="west" body="block" localizable="true" position="0.000,0.0225,0.0275" orientation="0,0,-90" range="0.020"/>
<radio medium="nfc" id="bottom" body="block" localizable="true" position="0.000,0.000,0.005" orientation="0,0,180" range="0.020"/>
</radios>
</devices>
</prototype>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment