Skip to content

Commit

Permalink
Merge pull request RoboSense-LiDAR#2 from DUT-Racing/enhance/add-oran…
Browse files Browse the repository at this point in the history
…ge-cone-marker

feat(sim): add orange cone marker for cv cones
  • Loading branch information
RobbinBaauw authored Oct 17, 2021
2 parents c360ce1 + 5c2386b commit 7553a37
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/simulation/simulator/src/sim_viz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ void SimViz::addConeMarker(const rclcpp::Time &time, const sim_msgs::msg::TrackO

} else if (track_object.object_type == sim_msgs::msg::TrackObject::ORANGE) {
marker.color.r = 1.0;
marker.color.g = static_cast<float>(165.0 / 255.0);
marker.color.g = 0.647;
marker.color.b = 0.0;
marker.mesh_resource = "package://simulator/meshes/track/cone_orange.dae";
} else if (track_object.object_type == sim_msgs::msg::TrackObject::BIG_ORANGE) {
marker.color.r = 1.0;
marker.color.g = static_cast<float>(165.0 / 255.0);
marker.color.g = 0.647;
marker.color.b = 0.0;
marker.mesh_resource = "package://simulator/meshes/track/cone_orange_big.dae";
} else if (track_object.object_type == sim_msgs::msg::TrackObject::TK_DEVICE) {
Expand Down Expand Up @@ -340,8 +340,12 @@ void SimViz::addWorldStateMarker(const cv_msgs::msg::Cone &cone, u_int32_t id, v
marker.color.r = 1.0;
marker.color.g = 1.0;
marker.color.b = 0.0;
} else {
} else if (cone_type == cv_msgs::msg::Cone::ORANGE) {
marker.color.r = 1.0;
marker.color.g = 0.647;
marker.color.b = 0.0;
} else {
marker.color.r = 0.0;
marker.color.g = 0.0;
marker.color.b = 0.0;
}
Expand Down

0 comments on commit 7553a37

Please sign in to comment.