diff --git a/build/sim/bot.gazebo.xacro b/build/sim/bot.gazebo.xacro index e681b1b9b95438290b6cf3eebac7df549b4b1dfa..357fa620e85482c9bce27129d63cd83c64fc46da 100644 --- a/build/sim/bot.gazebo.xacro +++ b/build/sim/bot.gazebo.xacro @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<robot xmlns:xacro="http://ros.org/wiki/xacro" name="turtlebot3_waffle_pi_sim"> +<robot xmlns:xacro="http://ros.org/wiki/xacro" name="turtlebot3_waffle_sim"> <xacro:arg name="laser_visual" default="false" /> <xacro:arg name="camera_visual" default="false" /> <xacro:arg name="imu_visual" default="false" /> @@ -44,8 +44,15 @@ <maxVel>1.0</maxVel> <material>Gazebo/FlatBlack</material> </gazebo> + <gazebo reference="imu_link"> + <sensor type="imu" name="imu"> + <always_on>true</always_on> + <visualize>$(arg imu_visual)</visualize> + </sensor> + <material>Gazebo/Grey</material> + </gazebo> <gazebo> - <plugin name="turtlebot3_waffle_pi_controller" filename="libgazebo_ros_diff_drive.so"> + <plugin name="turtlebot3_waffle_controller" filename="libgazebo_ros_diff_drive.so"> <commandTopic>cmd_vel</commandTopic> <odometryTopic>odom</odometryTopic> <odometryFrame>odom</odometryFrame> @@ -94,5 +101,79 @@ </imu> </plugin> </gazebo> - <!--link : https://www.raspberrypi.org/documentation/hardware/camera/--> + <gazebo reference="base_scan"> + <material>Gazebo/FlatBlack</material> + <sensor type="ray" name="lds_lfcd_sensor"> + <pose>0 0 0 0 0 0</pose> + <visualize>$(arg laser_visual)</visualize> + <update_rate>5</update_rate> + <ray> + <scan> + <horizontal> + <samples>360</samples> + <resolution>1</resolution> + <min_angle>0.0</min_angle> + <max_angle>6.28319</max_angle> + </horizontal> + </scan> + <range> + <min>0.120</min> + <max>3.5</max> + <resolution>0.015</resolution> + </range> + <noise> + <type>gaussian</type> + <mean>0.0</mean> + <stddev>0.01</stddev> + </noise> + </ray> + <plugin name="gazebo_ros_lds_lfcd_controller" filename="libgazebo_ros_laser.so"> + <topicName>scan</topicName> + <frameName>base_scan</frameName> + </plugin> + </sensor> + </gazebo> + <gazebo reference="camera_rgb_frame"> + <sensor type="depth" name="realsense_R200"> + <always_on>true</always_on> + <visualize>$(arg camera_visual)</visualize> + <camera> + <horizontal_fov>1.3439</horizontal_fov> + <image> + <width>1920</width> + <height>1080</height> + <format>R8G8B8</format> + </image> + <depth_camera /> + <clip> + <near>0.03</near> + <far>100</far> + </clip> + </camera> + <plugin name="camera_controller" filename="libgazebo_ros_openni_kinect.so"> + <baseline>0.2</baseline> + <alwaysOn>true</alwaysOn> + <updateRate>30.0</updateRate> + <cameraName>camera</cameraName> + <frameName>camera_rgb_optical_frame</frameName> + <imageTopicName>rgb/image_raw</imageTopicName> + <depthImageTopicName>depth/image_raw</depthImageTopicName> + <pointCloudTopicName>depth/points</pointCloudTopicName> + <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName> + <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName> + <pointCloudCutoff>0.4</pointCloudCutoff> + <hackBaseline>0.07</hackBaseline> + <distortionK1>0.0</distortionK1> + <distortionK2>0.0</distortionK2> + <distortionK3>0.0</distortionK3> + <distortionT1>0.0</distortionT1> + <distortionT2>0.0</distortionT2> + <CxPrime>0.0</CxPrime> + <Cx>0.0</Cx> + <Cy>0.0</Cy> + <focalLength>0</focalLength> + <hackBaseline>0</hackBaseline> + </plugin> + </sensor> + </gazebo> </robot> diff --git a/build/sim/bot.urdf.xacro b/build/sim/bot.urdf.xacro index a268ae6cd2d2c2f5fc5f79efe38976a51b40ddbd..0e9289f6c3bae4a5f2dfc9b2d173f0ffb5025daa 100644 --- a/build/sim/bot.urdf.xacro +++ b/build/sim/bot.urdf.xacro @@ -1,7 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<robot xmlns:xacro="http://ros.org/wiki/xacro" name="turtlebot3_waffle_pi"> +<robot xmlns:xacro="http://ros.org/wiki/xacro" name="turtlebot3_waffle"> <xacro:include filename="$(find turtlebot3_description)/urdf/common_properties.xacro" /> <xacro:include filename="$(find sim)/bot.gazebo.xacro" /> + <xacro:property name="r200_cam_rgb_px" value="0.005" /> + <xacro:property name="r200_cam_rgb_py" value="0.018" /> + <xacro:property name="r200_cam_rgb_pz" value="0.013" /> + <xacro:property name="r200_cam_depth_offset" value="0.01" /> <link name="base_footprint" /> <joint name="base_joint" type="fixed"> <parent link="base_footprint" /> @@ -12,7 +16,7 @@ <visual> <origin xyz="-0.064 0 0.0" rpy="0 0 0" /> <geometry> - <mesh filename="package://turtlebot3_description/meshes/bases/waffle_pi_base.stl" scale="0.001 0.001 0.001" /> + <mesh filename="package://turtlebot3_description/meshes/bases/waffle_base.stl" scale="0.001 0.001 0.001" /> </geometry> <material name="light_black" /> </visual> @@ -129,7 +133,7 @@ </joint> <link name="base_scan"> <visual> - <origin xyz="0 0 0.0" rpy="0 0 0" /> + <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <mesh filename="package://turtlebot3_description/meshes/sensors/lds.stl" scale="0.001 0.001 0.001" /> </geometry> @@ -148,20 +152,34 @@ </inertial> </link> <joint name="camera_joint" type="fixed"> - <origin xyz="0.073 -0.011 0.084" rpy="0 0 0" /> + <origin xyz="0.064 -0.065 0.094" rpy="0 0 0" /> <parent link="base_link" /> <child link="camera_link" /> </joint> <link name="camera_link"> + <visual> + <origin xyz="0 0 0" rpy="1.57 0 1.57" /> + <geometry> + <mesh filename="package://turtlebot3_description/meshes/sensors/r200.dae" /> + </geometry> + </visual> <collision> - <origin xyz="0.005 0.011 0.013" rpy="0 0 0" /> + <origin xyz="0.003 0.065 0.007" rpy="0 0 0" /> <geometry> - <box size="0.015 0.030 0.027" /> + <box size="0.012 0.132 0.020" /> </geometry> </collision> + <!-- This inertial field needs doesn't contain reliable data!! --> + <!-- <inertial> + <mass value="0.564" /> + <origin xyz="0 0 0" /> + <inertia ixx="0.003881243" ixy="0.0" ixz="0.0" + iyy="0.000498940" iyz="0.0" + izz="0.003879257" /> + </inertial>--> </link> <joint name="camera_rgb_joint" type="fixed"> - <origin xyz="0.003 0.011 0.009" rpy="0 0 0" /> + <origin xyz="${r200_cam_rgb_px} ${r200_cam_rgb_py} ${r200_cam_rgb_pz}" rpy="0 0 0" /> <parent link="camera_link" /> <child link="camera_rgb_frame" /> </joint> @@ -172,4 +190,16 @@ <child link="camera_rgb_optical_frame" /> </joint> <link name="camera_rgb_optical_frame" /> + <joint name="camera_depth_joint" type="fixed"> + <origin xyz="${r200_cam_rgb_px} ${r200_cam_rgb_py + r200_cam_depth_offset} ${r200_cam_rgb_pz}" rpy="0 0 0" /> + <parent link="camera_link" /> + <child link="camera_depth_frame" /> + </joint> + <link name="camera_depth_frame" /> + <joint name="camera_depth_optical_joint" type="fixed"> + <origin xyz="0 0 0" rpy="-1.57 0 -1.57" /> + <parent link="camera_depth_frame" /> + <child link="camera_depth_optical_frame" /> + </joint> + <link name="camera_depth_optical_frame" /> </robot> diff --git a/build/sim/botname.txt b/build/sim/botname.txt index 06115db6b4d48d5478a2d5abcc55375e585fffdc..07bb3138a66f538ea0a699432c9312975b3b69c2 100644 --- a/build/sim/botname.txt +++ b/build/sim/botname.txt @@ -1 +1 @@ -waffle_pi \ No newline at end of file +waffle \ No newline at end of file diff --git a/src/var/FeatureModelConfigurator/configs/test.xml b/src/var/FeatureModelConfigurator/configs/test.xml index 3472dd56eb9cb7001d85127c2c602a27d34bb22e..2346818cebe5c92c872f1136b7c1060e2f9d3646 100644 --- a/src/var/FeatureModelConfigurator/configs/test.xml +++ b/src/var/FeatureModelConfigurator/configs/test.xml @@ -5,13 +5,13 @@ <feature automatic="unselected" name="turtlebot3_burger"/> <feature automatic="unselected" name="turtlebot3_burger_for_autorace"/> <feature automatic="unselected" name="turtlebot3_burgertest1"/> - <feature automatic="unselected" name="turtlebot3_waffle"/> - <feature manual="selected" name="turtlebot3_waffle_pi"/> + <feature manual="selected" name="turtlebot3_waffle"/> + <feature automatic="unselected" name="turtlebot3_waffle_pi"/> <feature automatic="selected" name="Sensors"/> - <feature automatic="unselected" name="NO_CHANGE"/> - <feature manual="selected" name="Custom"/> - <feature name="Pi_Camera"/> - <feature name="imu"/> - <feature name="lds_lfcd_sensor"/> - <feature name="realsense_R200"/> + <feature manual="selected" name="NO_CHANGE"/> + <feature automatic="unselected" name="Custom"/> + <feature automatic="unselected" name="Pi_Camera"/> + <feature automatic="unselected" name="imu"/> + <feature automatic="unselected" name="lds_lfcd_sensor"/> + <feature automatic="unselected" name="realsense_R200"/> </configuration> diff --git a/src/var/FeatureModelConfigurator/resources/output/featuremodel.xml b/src/var/FeatureModelConfigurator/resources/output/featuremodel.xml index 5145399b09271131f9e156318751d0a0cedf8400..a8bd65a9a6d9fe8504b9b3612797b34d8d128fff 100644 --- a/src/var/FeatureModelConfigurator/resources/output/featuremodel.xml +++ b/src/var/FeatureModelConfigurator/resources/output/featuremodel.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <specification> - <templates name="turtlebot3_waffle_pi" /> + <templates name="turtlebot3_waffle" /> <sensors> - <mode param="Custom" /> + <mode param="NO_CHANGE" /> </sensors> </specification> diff --git a/src/var/FeatureModelConfigurator/src/Configurator.jak b/src/var/FeatureModelConfigurator/src/Configurator.jak index a09c23337bce5607ade934cd52b603f8101c8d94..4e48e0006a35a4e034eccf58566088ca2e58e1b3 100644 --- a/src/var/FeatureModelConfigurator/src/Configurator.jak +++ b/src/var/FeatureModelConfigurator/src/Configurator.jak @@ -176,12 +176,22 @@ abstract class Configurator$$ConfiguratorMain { } } -SoUrCe turtlebot3_waffle_pi "../features/turtlebot3_waffle_pi/Configurator.jak";/** +SoUrCe turtlebot3_waffle "../features/turtlebot3_waffle/Configurator.jak";/** * TODO description */ -public class Configurator extends Configurator$$ConfiguratorMain { +abstract class Configurator$$turtlebot3_waffle extends Configurator$$ConfiguratorMain { public void save() { - Super().addToModuleList("turtlebot3_waffle_pi"); + Super().addToModuleList("turtlebot3_waffle"); + Super().save(); + } +} + +SoUrCe NO_CHANGE "../features/NO_CHANGE/Configurator.jak";/** + * TODO description + */ +public class Configurator extends Configurator$$turtlebot3_waffle { + public void save() { + Super().addToModuleList("NO_CHANGE"); Super().save(); } } \ No newline at end of file diff --git a/src/var/FeatureModelConfigurator/src/Configurator.java b/src/var/FeatureModelConfigurator/src/Configurator.java index 3971d09b0eb66639750b2b006bbc50a8efa59a37..ee822aa62b8995b8ddb53f83833708672f5265a0 100644 --- a/src/var/FeatureModelConfigurator/src/Configurator.java +++ b/src/var/FeatureModelConfigurator/src/Configurator.java @@ -179,9 +179,19 @@ abstract class Configurator$$ConfiguratorMain { /** * TODO description */ -public class Configurator extends Configurator$$ConfiguratorMain { +abstract class Configurator$$turtlebot3_waffle extends Configurator$$ConfiguratorMain { public void save() { - super.addToModuleList("turtlebot3_waffle_pi"); + super.addToModuleList("turtlebot3_waffle"); + super.save(); + } +} + +/** + * TODO description + */ +public class Configurator extends Configurator$$turtlebot3_waffle { + public void save() { + super.addToModuleList("NO_CHANGE"); super.save(); } } \ No newline at end of file