-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from furushchev/enable-task3
[jsk_mbzirc_tasks] add rviz for task3 / fix namespaces of UAVs
- Loading branch information
Showing
10 changed files
with
726 additions
and
1 deletion.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
jsk_mbzirc_common/gazebo_model/models/dropping_zone_box/box-object.l
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
;; box.l | ||
;; Author: Yuki Furuta <[email protected]> | ||
|
||
(defclass box-object | ||
:super cascaded-link) | ||
|
||
(defmethod box-object | ||
(:init | ||
(&rest args &key (name "dropping_zone_box") (pos (float-vector 0 0 0)) (rot (unit-matrix 3)) &allow-other-keys) | ||
(let (c bc | ||
blink0 | ||
box inner) | ||
(setq box (make-cube 100000 50000 80000 :pos #f(0 0 40000))) | ||
(setq inner (make-cube 95000 45000 77500 :pos #f(0 0 42500))) | ||
(setq box (body- box inner)) | ||
|
||
(send-super* :init :name name args) | ||
(setq bc (list box)) | ||
(dolist (b (cdr bc)) (send (car bc) :assoc b)) | ||
(send (elt bc 0) :set-color :gray) | ||
(setq blink0 (instance bodyset-link :init (make-cascoords) :bodies bc :name :box-bodyset :weight 1 :centroid (float-vector 0.0 0.0 0.0) :inertia-tensor #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)))) | ||
;; definition of assoc | ||
(send self :assoc blink0) | ||
(setq links (list blink0)) | ||
(setq joint-list (list)) | ||
(send self :init-ending) | ||
(send self :move-to (make-coords :pos pos :rot rot)) | ||
(send-all links :worldcoords) | ||
self)) | ||
|
||
(:handle (&rest args) (forward-message-to-all (list ) args)) | ||
(:attention (&rest args) (forward-message-to-all (list ) args)) | ||
(:button (&rest args) (forward-message-to-all (list ) args)) | ||
) | ||
|
||
(defun box (&rest args) (instance* box-object :init args)) | ||
|
8 changes: 8 additions & 0 deletions
8
jsk_mbzirc_common/gazebo_model/models/dropping_zone_box/box-to-collada.l
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
;; box-to-collada.l | ||
;; Author: Yuki Furuta <[email protected]> | ||
|
||
(load "irteus/irtcollada.l") | ||
|
||
(load "box-object.l") | ||
(collada::eus2collada (box) ".") | ||
(exit) |
16 changes: 16 additions & 0 deletions
16
jsk_mbzirc_common/gazebo_model/models/dropping_zone_box/generate_dropping_zone_box_model.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
if [ "`which gzsdf`" = "" ]; then | ||
GZSDF="gz sdf -p" | ||
else | ||
GZSDF="gzsdf print" | ||
fi | ||
rm -rf meshes model.sdf model.urdf dropping_zone_box.dae | ||
roseus box-to-collada.l | ||
sed -i -e 's/nil/box/g' dropping_zone_box.dae | ||
rosrun collada_urdf collada_to_urdf dropping_zone_box.dae -G -A --mesh_output_dir meshes --mesh_prefix "model://dropping_zone_box/meshes" -O model.urdf | ||
$GZSDF model.urdf > model.sdf | ||
sed -i -e 's/<mass>.*<\/mass>/<mass>20<\/mass>/g' model.sdf | ||
sed -i -e 's@<ixx>.*</ixx>@<ixx>1</ixx>@g' model.sdf | ||
sed -i -e 's@<iyy>.*</iyy>@<iyy>1</iyy>@g' model.sdf | ||
sed -i -e 's@<izz>.*</izz>@<izz>1</izz>@g' model.sdf |
101 changes: 101 additions & 0 deletions
101
jsk_mbzirc_common/gazebo_model/models/dropping_zone_box/meshes/box_link_mesh.dae
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.0"?> | ||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> | ||
<asset> | ||
<contributor> | ||
<author>Someone</author> | ||
<authoring_tool>Assimp Collada Exporter</authoring_tool> | ||
</contributor> | ||
<created>2000-01-01T23:59:59</created> | ||
<modified>2000-01-01T23:59:59</modified> | ||
<unit name="centimeter" meter="0.01" /> | ||
<up_axis>Y_UP</up_axis> | ||
</asset> | ||
<library_effects> | ||
<effect id="m0blinn20-fx" name="m0blinn20"> | ||
<profile_COMMON> | ||
<technique sid="standard"> | ||
<phong> | ||
<emission> | ||
<color sid="emission">0 0 0 1</color> | ||
</emission> | ||
<ambient> | ||
<color sid="ambient">0.371094 0.371094 0.371094 1</color> | ||
</ambient> | ||
<diffuse> | ||
<color sid="diffuse">0.742188 0.742188 0.742188 1</color> | ||
</diffuse> | ||
<specular> | ||
<color sid="specular">0 0 0 1</color> | ||
</specular> | ||
<shininess> | ||
<float sid="shininess">10</float> | ||
</shininess> | ||
<reflective> | ||
<color sid="reflective">0 0 0 0</color> | ||
</reflective> | ||
</phong> | ||
</technique> | ||
</profile_COMMON> | ||
</effect> | ||
</library_effects> | ||
<library_materials> | ||
<material id="m0blinn20" name="m0blinn20"> | ||
<instance_effect url="#m0blinn20-fx"/> | ||
</material> | ||
</library_materials> | ||
<library_geometries> | ||
<geometry id="meshId0" name="meshId0_name" > | ||
<mesh> | ||
<source id="meshId0-positions" name="meshId0-positions"> | ||
<float_array id="meshId0-positions-array" count="144"> -50 25 80 -50 25 0 -50 -25 0 -50 -25 80 -50 -25 0 50 -25 0 50 -25 80 -50 -25 80 50 -25 0 50 25 0 50 25 80 50 -25 80 50 25 80 -50 25 80 -47.5 22.5 80 47.5 22.5 80 50 -25 80 -50 -25 80 -47.5 -22.5 80 47.5 -22.5 80 50 25 0 -50 25 0 -50 25 80 50 25 80 -50 25 0 50 25 0 50 -25 0 -50 -25 0 -47.5 22.5 3.75 -47.5 22.5 80 -47.5 -22.5 80 -47.5 -22.5 3.75 47.5 -22.5 3.75 -47.5 -22.5 3.75 -47.5 -22.5 80 47.5 -22.5 80 47.5 22.5 3.75 47.5 -22.5 3.75 47.5 -22.5 80 47.5 22.5 80 47.5 22.5 3.75 -47.5 22.5 3.75 -47.5 -22.5 3.75 47.5 -22.5 3.75 -47.5 22.5 3.75 47.5 22.5 3.75 47.5 22.5 80 -47.5 22.5 80 </float_array> | ||
<technique_common> | ||
<accessor count="48" offset="0" source="#meshId0-positions-array" stride="3"> | ||
<param name="X" type="float" /> | ||
<param name="Y" type="float" /> | ||
<param name="Z" type="float" /> | ||
</accessor> | ||
</technique_common> | ||
</source> | ||
<source id="meshId0-normals" name="meshId0-normals"> | ||
<float_array id="meshId0-normals-array" count="144"> -1 0 -0 -1 0 -0 -1 0 -0 -1 0 0 0 -1 0 0 -1 0 0 -1 0 -0 -1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 -0 1 0 0 1 0 -0 1 0 0 1 0 1 0 0 1 0 0 1 0 -0 1 0 0 0 -1 0 0 -1 0 0 -1 0 0 -1 1 0 -0 1 0 -0 1 0 -0 1 0 0 0 1 0 0 1 0 0 1 0 -0 1 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 -1 0 0 -1 0 0 -1 0 -0 -1 0 </float_array> | ||
<technique_common> | ||
<accessor count="48" offset="0" source="#meshId0-normals-array" stride="3"> | ||
<param name="X" type="float" /> | ||
<param name="Y" type="float" /> | ||
<param name="Z" type="float" /> | ||
</accessor> | ||
</technique_common> | ||
</source> | ||
<vertices id="meshId0-vertices"> | ||
<input semantic="POSITION" source="#meshId0-positions" /> | ||
<input semantic="NORMAL" source="#meshId0-normals" /> | ||
</vertices> | ||
<polylist count="28" material="theresonlyone"> | ||
<input offset="0" semantic="VERTEX" source="#meshId0-vertices" /> | ||
<vcount>3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 </vcount> | ||
<p>0 1 2 2 3 0 4 5 6 6 7 4 8 9 10 10 11 8 12 13 14 12 14 15 16 12 15 14 13 17 18 14 17 19 18 17 19 17 16 19 16 15 20 21 22 22 23 20 24 25 26 26 27 24 28 29 30 30 31 28 32 33 34 34 35 32 36 37 38 38 39 36 40 41 42 42 43 40 44 45 46 46 47 44 </p> | ||
</polylist> | ||
</mesh> | ||
</geometry> | ||
</library_geometries> | ||
<library_visual_scenes> | ||
<visual_scene id="myScene" name="myScene"> | ||
<node id="base1d_med" name="base1d_med"> | ||
<matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix> | ||
<node id="box_link" name="box_link"> | ||
<matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix> | ||
<instance_geometry url="#meshId0"> | ||
<bind_material> | ||
<technique_common> | ||
<instance_material symbol="theresonlyone" target="#m0blinn20" /> | ||
</technique_common> | ||
</bind_material> | ||
</instance_geometry> | ||
</node> | ||
</node> | ||
</visual_scene> | ||
</library_visual_scenes> | ||
<scene> | ||
<instance_visual_scene url="#myScene" /> | ||
</scene> | ||
</COLLADA> |
11 changes: 11 additions & 0 deletions
11
jsk_mbzirc_common/gazebo_model/models/dropping_zone_box/model.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" ?> | ||
<model> | ||
<name>dropping_zone_box</name> | ||
<version>1.0</version> | ||
<sdf version="1.4">model.sdf</sdf> | ||
<author> | ||
<name>Yuki Furuta</name> | ||
<email>[email protected]</email> | ||
</author> | ||
<description>mbzirc-jsk</description> | ||
</model> |
51 changes: 51 additions & 0 deletions
51
jsk_mbzirc_common/gazebo_model/models/dropping_zone_box/model.sdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<sdf version='1.5'> | ||
<model name='dropping_zone_box'> | ||
<link name='box_link'> | ||
<pose frame=''>0 0 0 0 -0 0</pose> | ||
<inertial> | ||
<pose frame=''>0 0 0 0 -0 0</pose> | ||
<mass>20</mass> | ||
<inertia> | ||
<ixx>1</ixx> | ||
<ixy>0</ixy> | ||
<ixz>0</ixz> | ||
<iyy>1</iyy> | ||
<iyz>0</iyz> | ||
<izz>1</izz> | ||
</inertia> | ||
</inertial> | ||
<collision name='box_link_collision'> | ||
<pose frame=''>0 0 0 0 -0 0</pose> | ||
<geometry> | ||
<mesh> | ||
<scale>1 1 1</scale> | ||
<uri>model://dropping_zone_box/meshes/box_link_mesh.dae</uri> | ||
</mesh> | ||
</geometry> | ||
<surface> | ||
<contact> | ||
<ode/> | ||
</contact> | ||
<friction> | ||
<ode> | ||
<mu>0.9</mu> | ||
<mu2>0.9</mu2> | ||
</ode> | ||
</friction> | ||
</surface> | ||
</collision> | ||
<visual name='box_link_visual'> | ||
<pose frame=''>0 0 0 0 -0 0</pose> | ||
<geometry> | ||
<mesh> | ||
<scale>1 1 1</scale> | ||
<uri>model://dropping_zone_box/meshes/box_link_mesh.dae</uri> | ||
</mesh> | ||
</geometry> | ||
</visual> | ||
<gravity>1</gravity> | ||
<velocity_decay/> | ||
<self_collide>0</self_collide> | ||
</link> | ||
</model> | ||
</sdf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.