From 4eabf0fb14a67dfa2a760efc8d8ed2af8c8152db Mon Sep 17 00:00:00 2001 From: marvin <marvin@marvin-TERRA-MOBILE-1529H> Date: Thu, 27 Feb 2020 13:02:15 +0100 Subject: [PATCH] Test --- build/sim/bot.gazebo.xacro | 88 +++++++++++++++++-- build/sim/botname.txt | 2 +- .../FeatureModelConfigurator/configs/test.xml | 3 +- .../resources/output/featuremodel.xml | 4 +- .../src/Configurator.jak | 16 +++- .../src/Configurator.java | 14 ++- 6 files changed, 111 insertions(+), 16 deletions(-) diff --git a/build/sim/bot.gazebo.xacro b/build/sim/bot.gazebo.xacro index 851a552..357fa62 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 07bb313..82270b4 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 e37e889..553cef5 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 9a6b0e5..0b5b671 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 afd66aa..7b72c8d 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 e51d071..878c955 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 -- GitLab