Permalink
Browse files

Added gui.

  • Loading branch information...
1 parent 3bfbad4 commit 22f31a63d6475c6c5bc8b145d6e9729c0ffbff29 @oscillare oscillare committed Aug 21, 2012
@@ -0,0 +1,149 @@
+xtion:
+ image: $(find urdf_compose)/images/xtion.png
+ description: >
+ The ASUS Xtion PRO LIVE uses infrared sensors, adaptive depth detection
+ technology, color image sensing and audio stream to capture a users'
+ real-time image, movement, and voice, making user tracking more precise.
+ <p>
+ http://www.asus.com/Multimedia/Motion_Sensor/Xtion_PRO_LIVE/
+ </p>
+ parent:
+ plate_3_link:
+ standard:
+ params:
+ parent: plate_3_link
+ x_loc: "-0.0892782"
+ y_loc: "0"
+ z_loc: "0.2032"
+ rr: "0"
+ rp: "0"
+ ry: "0"
+ requires:
+ $(find turtlebot_description)/urdf/turtlebot_hardware.urdf.xacro:
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "4"
+ x_loc: "-0.0892782"
+ y_loc: "-0.098"
+ z_loc: "-0.000125"
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "5"
+ x_loc: "-0.0892782"
+ y_loc: "0.098"
+ z_loc: "-0.000125"
+ standard facing backward:
+ params:
+ parent: plate_3_link
+ x_loc: "-0.0892782"
+ y_loc: "0"
+ z_loc: "0.2032"
+ rr: "0"
+ rp: "0"
+ ry: "3.1415927"
+ requires:
+ $(find turtlebot_description)/urdf/turtlebot_hardware.urdf.xacro:
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "4"
+ x_loc: "-0.0892782"
+ y_loc: "-0.098"
+ z_loc: "-0.000125"
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "5"
+ x_loc: "-0.0892782"
+ y_loc: "0.098"
+ z_loc: "-0.000125"
+ middle facing forward:
+ params:
+ parent: plate_3_link
+ x_loc: "0.01316"
+ y_loc: "0"
+ z_loc: "0.2032"
+ rr: "0"
+ rp: "0"
+ ry: "0"
+ requires:
+ $(find turtlebot_description)/urdf/turtlebot_hardware.urdf.xacro:
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "4"
+ x_loc: "0.01316"
+ y_loc: "-0.098"
+ z_loc: "-0.000125"
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "5"
+ x_loc: "0.01316"
+ y_loc: "0.098"
+ z_loc: "-0.000125"
+ middle facing backward:
+ params:
+ parent: plate_3_link
+ x_loc: "0.01316"
+ y_loc: "0"
+ z_loc: "0.2032"
+ rr: "0"
+ rp: "0"
+ ry: "3.1415927"
+ requires:
+ $(find turtlebot_description)/urdf/turtlebot_hardware.urdf.xacro:
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "4"
+ x_loc: "0.01316"
+ y_loc: "-0.098"
+ z_loc: "-0.000125"
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "5"
+ x_loc: "0.01316"
+ y_loc: "0.098"
+ z_loc: "-0.000125"
+ front facing forward:
+ params:
+ parent: plate_3_link
+ x_loc: "0.0892782"
+ y_loc: "0"
+ z_loc: "0.2032"
+ rr: "0"
+ rp: "0"
+ ry: "3.1415927"
+ requires:
+ $(find turtlebot_description)/urdf/turtlebot_hardware.urdf.xacro:
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "4"
+ x_loc: "0.0892782"
+ y_loc: "-0.098"
+ z_loc: "-0.000125"
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "5"
+ x_loc: "0.0892782"
+ y_loc: "0.098"
+ z_loc: "-0.000125"
+ front facing backward:
+ params:
+ parent: plate_3_link
+ x_loc: "0.0892782"
+ y_loc: "0"
+ z_loc: "0.2032"
+ rr: "0"
+ rp: "0"
+ ry: "3.1415927"
+ requires:
+ $(find turtlebot_description)/urdf/turtlebot_hardware.urdf.xacro:
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "4"
+ x_loc: "0.0892782"
+ y_loc: "-0.098"
+ z_loc: "-0.000125"
+ - turtlebot_standoff_8in:
+ parent: plate_3_link
+ number: "5"
+ x_loc: "0.0892782"
+ y_loc: "0.098"
+ z_loc: "-0.000125"
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<robot name="xtion" xmlns:xacro="http://ros.org/wiki/xacro">
+ <include filename="$(find turtlebot_description)/urdf/turtlebot_hardware.urdf.xacro" />
<property name="M_PI" value="3.14159" />
<xacro:macro name="xtion" params="parent x_loc y_loc z_loc rr rp ry">
@@ -35,8 +36,7 @@
<!-- platform for xtion -->
<joint name="base_xtion_platform_joint" type="fixed">
- <origin xyz="${x_loc} ${y_loc} ${z_loc}"
- rpy="${rr} ${rp} ${ry}" />
+ <origin xyz="${x_loc} ${y_loc} ${z_loc}" rpy="${rr} ${rp} ${ry}" />
<parent link="${parent}" />
<child link="xtion_platform" />
</joint>
@@ -1,2 +1,3 @@
*.pyc
*.urdf.xacro
+*.swp
@@ -1,5 +1,6 @@
-Format for yaml File
---------------------
+Format for File to be Processed by compose.py (yaml)
+----------------------------------------------------
+
- package: <package name>
files:
- filename: <filename>
@@ -10,27 +11,80 @@ Format for yaml File
Generate urdf File
---------------------
+------------------
+
Generate xml file.
- rosrun urdf_compose compose.py [-o <outfile>] <yaml>
+ rosrun urdf_compose compose.py <yaml> [-o <outfile>] [-n <robot name>]
-If -o is not specificed, the default is standard output.
+If -o is not specificed, the default is standard output. If -n is not
+specified, the default is "turtlebot".
Run Demo
--------
+
+The compose script is to be used only if all parts listed are macros.
+
1. Open the urdf directory.
roscd urdf_compose/urdf
2. Generate urdf files. (yaml files are located in the demo directory.)
- rosrun urdf_compose compose.py -o xtion.urdf.xacro ../demo/xtion.yaml
- rosrun urdf_compose compose.py -o turtlebot.urdf.xacro ../demo/turtlebot.yaml
+ rosrun urdf_compose compose.py ../demo/kinect.yaml -o kinect.urdf.xacro -n kinect
+ rosrun urdf_compose compose.py ../demo/xtion.yaml -o xtion.urdf.xacro -n xtion
+ rosrun urdf_compose compose.py ../demo/turtlebot_body.yaml -o turtlebot_body.urdf.xacro
+ rosrun urdf_compose compose.py ../demo/turtlebot.yaml -o turtlebot.urdf.xacro
3. Launch rviz.
roslaunch urdf_compose demo.launch model:=<model>
- <model> = {xtion.urdf.xacro, turtlebot.urdf.xacro}
+ <model> = {kinect.urdf.xacro, xtion.urdf.xacro, turtlebot.urdf.xacro, turtlebot_body.urdf.xacro}
+
+Note: The turtlebot_body included in the package does not include the kinect standoffs
+ unlike the body included in turtlebot_description.
+
+
+
+
+Run GUI
+-------
+
+1. Build the turtlebot_body.
+
+ roscd urdf_compose/urdf
+ rosrun urdf_compose compose.py ../demo/turtlebot_body.yaml -o turtlebot_body.urdf.xacro
+
+2. Run the GUI.
+
+ rosrun urdf_compose gui.py
+
+If the output file is placed in urdf_compose/urdf, you can launch demo.launch to view
+the robot in rviz.
+
+Robots added to the "Select robot" combo box should not be macros. Only unique robot
+names will be listed.
+
+Only macros from added files will be displayed in the "Accessories" list.
+
+
+Format for Descripiton Files (yaml)
+-----------------------------------
+
+<accessory name/macro name>:
+ image: <path to image>
+ description: <description>
+ parent:
+ <link name>:
+ <position name>:
+ params: # parameters for the accessory being described
+ <parameter name>: <value>
+ requires:
+ <path to file that contains the required accessory>
+ - <accessory name/macro name>
+ <parameter name>: <value> # parameters for the required piece
+
+Examples are located in <path to urdf_compose>/urdf/info_kinect.yaml and
+<path to turtlebot_xtion_top_description>/urdf/info_xtion.yaml
@@ -1,9 +0,0 @@
-#! /usr/bin/env python
-
-import roslib
-
-roslib.load_manifest('urdf_compose')
-import compose
-
-if __name__ == "__main__":
- compose.main()
@@ -0,0 +1,34 @@
+- package: urdf_compose
+ files:
+ - filename: base_link.xacro
+ parts:
+ - part_name: base_link
+ - filename: kinect.xacro
+ parts:
+ - part_name: turtlebot_kinect
+ params:
+ parent: "base_link"
+ cam_x: "0.0179998"
+ cam_y: "0"
+ cam_z: "0.101549"
+ cam_rr: "0"
+ cam_rp: "0"
+ cam_ry: "0"
+- package: turtlebot_description
+ files:
+ - filename: turtlebot_hardware.urdf.xacro
+ parts:
+ - part_name: turtlebot_standoff_kinect
+ params:
+ parent: "base_link"
+ number: "0"
+ x_loc: "0"
+ y_loc: "-0.098"
+ z_loc: "0"
+ - part_name: turtlebot_standoff_kinect
+ params:
+ parent: "base_link"
+ number: "1"
+ x_loc: "0"
+ y_loc: "0.098"
+ z_loc: "0"
@@ -1,26 +1,50 @@
-- package: turtlebot_description
+- package: urdf_compose
files:
- - filename: turtlebot_body.urdf.xacro
+ - filename: turtlebot_body.xacro
parts:
- part_name: turtlebot_body
- - filename: turtlebot_kinect.urdf.xacro
+ - filename: kinect.xacro
parts:
- part_name: turtlebot_kinect
+ params:
+ parent: "plate_2_link"
+ cam_x: "-0.0844382"
+ cam_y: "0"
+ cam_z: "0.10475"
+ cam_rr: "0"
+ cam_rp: "0"
+ cam_ry: "0"
+- package: turtlebot_description
+ files:
- filename: turtlebot_hardware.urdf.xacro
parts:
- - part_name: turtlebot_standoff_8in
+ - part_name: turtlebot_standoff_kinect
+ params:
+ parent: "plate_2_link"
+ number: "0"
+ x_loc: "-0.102438"
+ y_loc: "-0.098"
+ z_loc: "0.003201"
+ - part_name: turtlebot_standoff_kinect
+ params:
+ parent: "plate_2_link"
+ number: "1"
+ x_loc: "-0.102438"
+ y_loc: "0.098"
+ z_loc: "0.003201"
+ - part_name: turtlebot_standoff_8in # for xtion
params:
parent: "plate_3_link"
number: "4"
x_loc: "-0.0892782"
- y_loc: "0.098"
+ y_loc: "-0.098"
z_loc: "-0.000125"
- - part_name: turtlebot_standoff_8in
+ - part_name: turtlebot_standoff_8in # for xtion
params:
parent: "plate_3_link"
number: "5"
x_loc: "-0.0892782"
- y_loc: "-0.098"
+ y_loc: "0.098"
z_loc: "-0.000125"
- package: turtlebot_xtion_top_description
files:
@@ -0,0 +1,5 @@
+- package: urdf_compose
+ files:
+ - filename: turtlebot_body.xacro
+ parts:
+ - part_name: turtlebot_body
Oops, something went wrong.

0 comments on commit 22f31a6

Please sign in to comment.