Drake
generate_obj.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 
8 
9 namespace drake {
10 namespace maliput {
11 namespace utility {
12 
15 struct ObjFeatures {
18  double max_grid_unit{1.0};
21  double min_grid_resolution{5.0};
23  bool draw_stripes{true};
25  bool draw_arrows{true};
27  bool draw_lane_haze{true};
29  bool draw_branch_points{true};
33  double stripe_width{0.25};
35  double stripe_elevation{0.05};
37  double arrow_elevation{0.05};
39  double lane_haze_elevation{0.02};
43  double branch_point_height{0.5};
45  api::GeoPosition origin{0., 0., 0.};
48  std::vector<api::SegmentId> highlighted_segments;
49 };
50 
66 void GenerateObjFile(const api::RoadGeometry* road_geometry,
67  const std::string& dirpath,
68  const std::string& fileroot,
69  const ObjFeatures& features);
70 
71 } // namespace utility
72 } // namespace maliput
73 } // namespace drake
bool draw_stripes
Draw stripes along lane_bounds() of each lane?
Definition: generate_obj.h:23
Definition: generate_obj.cc:24
bool draw_branch_points
Draw branching at BranchPoints?
Definition: generate_obj.h:29
double lane_haze_elevation
Absolute elevation (h) of lane-haze above road surface.
Definition: generate_obj.h:39
bool draw_arrows
Draw arrows at start/finish of each lane?
Definition: generate_obj.h:25
A position in 3-dimensional geographical Cartesian space, i.e., in the world frame, consisting of three components x, y, and z.
Definition: lane_data.h:128
Definition: automotive_demo.cc:88
double branch_point_height
Height of rendered branch-point arrows.
Definition: generate_obj.h:43
Abstract API for the geometry of a road network, including both the network topology and the geometry...
Definition: road_geometry.h:26
bool draw_lane_haze
Draw highlighting swath with lane_bounds() of each lane?
Definition: generate_obj.h:27
double arrow_elevation
Absolute elevation (h) of arrows above road surface.
Definition: generate_obj.h:37
std::vector< api::SegmentId > highlighted_segments
ID&#39;s of specific segments to be highlighted.
Definition: generate_obj.h:48
void GenerateObjFile(const api::RoadGeometry *rg, const std::string &dirpath, const std::string &fileroot, const ObjFeatures &features)
Generates a Wavefront OBJ model of the road surface of an api::RoadGeometry.
Definition: generate_obj.cc:779
Multitude of parameters for generating an OBJ model of a road surface, with sensible defaults...
Definition: generate_obj.h:15
double min_grid_resolution
Minimum number of vertices, in either s- or r-dimension, along a lane&#39;s surface.
Definition: generate_obj.h:21
double branch_point_elevation
Absolute elevation (h) of branch-points above road surface.
Definition: generate_obj.h:41
double stripe_elevation
Absolute elevation (h) of stripes above road surface.
Definition: generate_obj.h:35
bool draw_elevation_bounds
Draw highlighting of elevation_bounds of each lane?
Definition: generate_obj.h:31
double stripe_width
Absolute width of stripes.
Definition: generate_obj.h:33
double max_grid_unit
Maximum distance between rendered vertices, in either s- or r-dimension, along a lane&#39;s surface...
Definition: generate_obj.h:18
api::GeoPosition origin
Origin of OBJ coordinates relative to world-frame.
Definition: generate_obj.h:45