diff --git a/build/sim/bot.gazebo.xacro b/build/sim/bot.gazebo.xacro index 851a5529ca481fff2d719693a4d320cdc04e4145..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,12 +101,79 @@ </imu> </plugin> </gazebo> - <!--link : https://www.raspberrypi.org/documentation/hardware/camera/--> - <gazebo reference="imu_link"> - <sensor type="imu" name="imu"> + <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>false</visualize> + <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> - <material>Gazebo/FlatBlack</material> </gazebo> </robot> diff --git a/build/sim/botname.txt b/build/sim/botname.txt index 07bb3138a66f538ea0a699432c9312975b3b69c2..82270b43acb2d4270776f0d0291d41c326156a75 100644 --- a/build/sim/botname.txt +++ b/build/sim/botname.txt @@ -1 +1 @@ -waffle \ 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 e37e88905c68c671c0b9500a4adbe9ccbcfc2e63..553cef551f157d6702848d8a38a5abeb4b6c6731 100644 --- a/src/var/FeatureModelConfigurator/configs/test.xml +++ b/src/var/FeatureModelConfigurator/configs/test.xml @@ -3,13 +3,14 @@ <feature automatic="selected" name="ConfiguratorMain"/> <feature automatic="selected" name="Templates"/> <feature automatic="unselected" name="Burger"/> + <feature automatic="unselected" name="BurgerForAutorace"/> <feature manual="selected" name="Waffle"/> <feature automatic="unselected" name="WafflePi"/> <feature automatic="selected" name="Sensors"/> <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="Pi_Camera"/> <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 9a6b0e5209cdaf8aa7ce4b6d527c9f71efd023a8..0b5b6715140c2192faa25bbd110b60d380ac4113 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="WafflePi" /> + <templates name="Waffle" /> <sensors> - <mode /> + <mode param="NO_CHANGE" /> </sensors> </specification> diff --git a/src/var/FeatureModelConfigurator/src/Configurator.jak b/src/var/FeatureModelConfigurator/src/Configurator.jak index afd66aa3756dee35289d8d1fe24da076018e0cd2..7b72c8df56d147e4a70c048d7d882d29e267c88d 100644 --- a/src/var/FeatureModelConfigurator/src/Configurator.jak +++ b/src/var/FeatureModelConfigurator/src/Configurator.jak @@ -176,12 +176,22 @@ abstract class Configurator$$ConfiguratorMain { } } -SoUrCe WafflePi "../features/WafflePi/Configurator.jak";/** +SoUrCe Waffle "../features/Waffle/Configurator.jak";/** * TODO description */ -public class Configurator extends Configurator$$ConfiguratorMain { +abstract class Configurator$$Waffle extends Configurator$$ConfiguratorMain { public void save() { - Super().addToModuleList("WafflePi"); + Super().addToModuleList("Waffle"); + Super().save(); + } +} + +SoUrCe NO_CHANGE "../features/NO_CHANGE/Configurator.jak";/** + * TODO description + */ +public class Configurator extends Configurator$$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 e51d0712b9428a76dda41b6e3a389ffba507d809..878c9555167db5d36543d15e2b1fd0756c44e2a8 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$$Waffle extends Configurator$$ConfiguratorMain { public void save() { - super.addToModuleList("WafflePi"); + super.addToModuleList("Waffle"); + super.save(); + } +} + +/** + * TODO description + */ +public class Configurator extends Configurator$$Waffle { + public void save() { + super.addToModuleList("NO_CHANGE"); super.save(); } } \ No newline at end of file