-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lidarimprovements #2011
Lidarimprovements #2011
Conversation
@@ -160,7 +160,8 @@ void ASimModeBase::initializeTimeOfDay() | |||
UObjectProperty* sun_prop = Cast<UObjectProperty>(p); | |||
UObject* sun_obj = sun_prop->GetObjectPropertyValue_InContainer(sky_sphere_); | |||
sun_ = Cast<ADirectionalLight>(sun_obj); | |||
default_sun_rotation_ = sun_->GetActorRotation(); | |||
if (sun_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this change.
same as #2062.
(this seems like a git merge issue on your side to me (we don't need optionsmenu.uasset && BP_LevelLoadButton.uasset))
please remove them as well if so
@@ -75,6 +75,9 @@ class RpcLibClientBase { | |||
msr::airlib::GpsBase::Output getGpsData(const std::string& gps_name = "", const std::string& vehicle_name = "") const; | |||
msr::airlib::DistanceBase::Output getDistanceSensorData(const std::string& distance_sensor_name = "", const std::string& vehicle_name = "") const; | |||
|
|||
// sensor omniscient APIs | |||
vector<int> simGetLidarSegmentation(const std::string& lidar_name = "", const std::string& vehicle_name = "") const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should just call this getLidarSegmentationData
to keep it in line with getLidarData
?
break; | ||
} | ||
} | ||
auto *lidar = findLidarByName(lidar_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this function, but I don't like the inconsistent indentation
@@ -260,6 +256,27 @@ class VehicleApiBase : public UpdatableObject { | |||
: VehicleControllerException(message) { | |||
} | |||
}; | |||
|
|||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
@@ -68,7 +68,7 @@ class LidarSimple : public LidarBase { | |||
|
|||
protected: | |||
virtual void getPointCloud(const Pose& lidar_pose, const Pose& vehicle_pose, | |||
TTimeDelta delta_time, vector<real_T>& point_cloud) = 0; | |||
TTimeDelta delta_time, vector<real_T>& point_cloud, vector<int>& segmentation_cloud) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have a different sensor - LidarSimpleSegmentation which has the segmentation IDs per point?
I am not sure how much is the effect of getting segmentation IDs is on a pure geometric lidar in the backend, as the end user may / may not need getSegmentationOutput
If you have a different sensor, you can have getLidarSegmentationData which can a return a object of type msr::airlib::LidarDatawithSegmentation
(or a innocuously misleading msr::airlib::LidarSegmentationData
), which contains XYZSegID
latter seems a more cleaner API to me
@@ -102,11 +104,13 @@ class LidarSimple : public LidarBase { | |||
last_time_ = output.time_stamp; | |||
|
|||
setOutput(output); | |||
setSegmentationOutput(segmentation_cloud_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation.. elsewhere as well
@@ -203,6 +206,9 @@ | |||
<ClInclude Include="Unreal\Plugins\AirSim\Source\Weather\WeatherLib.h"> | |||
<Filter>Source Files</Filter> | |||
</ClInclude> | |||
<ClInclude Include="Unreal\Plugins\AirSim\Source\UnrealSensors\UnrealLidarSensor.h"> | |||
<Filter>Source Files</Filter> | |||
</ClInclude> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda surprised that this was already not in the upstream vcxproj
@ironclownfish see above. |
also, please add documentation for this |
4f3eb9f
to
e27ddca
Compare
Returns the segmentation of each lidar point's collided object in the last lidar update. i.e. the segmentation IDs align with getLidarData().point_cloud
c10cfdc
to
d95a1f8
Compare
…finition in UnrealLidarSensor::getPointCloud from vector to msr::airlib::vector
fixed type naming error created by PR #2011
Added an api function: simGetLidarSegmentation().
Returns the segmentation of each lidar point's collided object in the last lidar update. i.e. the segmentation IDs align with getLidarData().point_cloud