Skip to content

Commit f513870

Browse files
committed
some bugfixes
Signed-off-by: Adam Dąbrowski <[email protected]>
1 parent 1516a27 commit f513870

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Gems/ROS2/Code/Source/Lidar/ROS2LidarSensorComponent.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,21 @@ namespace ROS2
2525
serialize->Class<ROS2LidarSensorComponent, ROS2SensorComponent>()
2626
->Version(1)
2727
->Field("lidarModel", &ROS2LidarSensorComponent::m_lidarModel)
28-
->Field("SensorConfiguration", &ROS2LidarSensorComponent::m_sensorConfiguration)
2928
;
3029

3130
if (AZ::EditContext* ec = serialize->GetEditContext())
3231
{
33-
ec->Class<ROS2LidarSensorComponent>("ROS2 Lidar Sensor", "[Simple Lidar component]")
32+
ec->Class<ROS2LidarSensorComponent>("ROS2 Lidar Sensor", "Lidar sensor component")
3433
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
3534
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
3635
->DataElement(AZ::Edit::UIHandlers::Default, &ROS2LidarSensorComponent::m_lidarModel, "Lidar Model", "Lidar model")
37-
->DataElement(AZ::Edit::UIHandlers::Default, &ROS2LidarSensorComponent::m_sensorConfiguration, "Sensor configuration", "Sensor configuration")
3836
;
3937
}
4038
}
4139
}
4240

4341
ROS2LidarSensorComponent::ROS2LidarSensorComponent()
4442
{ // TODO - replace with EditorComponent behavior
45-
SensorConfiguration sc;
4643
PublisherConfiguration pc;
4744
pc.m_type = "sensor_msgs::msg::PointCloud2";
4845
pc.m_topic = "pc";

Gems/ROS2/Code/Source/Sensor/ROS2SensorComponent.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ namespace ROS2
3131
{
3232
serialize->Class<ROS2SensorComponent, AZ::Component>()
3333
->Version(1)
34+
->Field("SensorConfiguration", &ROS2SensorComponent::m_sensorConfiguration)
3435
;
36+
37+
if (AZ::EditContext* ec = serialize->GetEditContext())
38+
{
39+
ec->Class<ROS2SensorComponent>("ROS2 Sensor", "Base component for sensors")
40+
->DataElement(AZ::Edit::UIHandlers::Default, &ROS2SensorComponent::m_sensorConfiguration, "Sensor configuration", "Sensor configuration")
41+
;
42+
}
3543
}
3644
}
3745

Gems/ROS2/Code/Source/Sensor/SensorConfiguration.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ namespace ROS2
2929

3030
if (AZ::EditContext* ec = serializeContext->GetEditContext())
3131
{
32-
ec->Class<SensorConfiguration>("ROS2 Sensor Component", "[Base component for sensors]")
32+
ec->Class<SensorConfiguration>("ROS2 Sensor Configuration", "Sensor configuration")
3333
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
3434
->DataElement(AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_visualise, "Visualise", "Visualise")
3535
->DataElement(AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_publishingEnabled, "Publishing Enabled", "Toggle publishing for topic")
3636
->DataElement(AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_frequency, "Frequency", "Frequency of publishing")
37-
->Attribute(AZ::Edit::Attributes::Min, 1)
38-
->Attribute(AZ::Edit::Attributes::Max, 100)
39-
->Attribute(AZ::Edit::Attributes::Step, 1)
4037
->DataElement(AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_publishersConfigurations, "Publishers", "Publishers")
4138
->Attribute(AZ::Edit::Attributes::ContainerCanBeModified, false)
4239
->Attribute(AZ::Edit::Attributes::AutoExpand, true)

0 commit comments

Comments
 (0)