ekumenlabs / terminus

Library to create cities and terrains
Apache License 2.0
56 stars 29 forks source link

Drake path cannot find utlity/yaml_to_obj #265

Open sanskarkatiyar opened 5 years ago

sanskarkatiyar commented 5 years ago

I am just starting with drake and terminus, and am having issues with the build process.

I am using Ubuntu 16.04 My directories are setup in the following manner at home:

-git --drake --terminus

I built drake as given in the documentation using Bazel (https://drake.mit.edu/from_source.html) I am facing issues with the path of the Drake installation.

The variable is set manually DRAKE_DISTRO=/home/sanskar/git/drake

Upon calling the command for OsmCityBuilder, I get the following:

Building city using OsmCityBuilder
====================================
Statistics for city_1
====================================
Roads: 12
Intersections: 9
Lanes: 12
Buildings: 0
Blocks: 0
Polyline Geometry
  Waypoints: 59
  Intersections: 22
  Average waypoints: 4.91666666667
  Average intersections: 1.83333333333
Lines and Arcs Geometry
  Waypoints: 72
  Intersections: 25
  Average waypoints: 6.0
  Average intersections: 2.08333333333
====================================
Generating street plots
Generating RNDF file
Generating SVG for RNDF
Generating Gazebo 7 SDF
Generating Gazebo 8 SDF
Generating monolane file
Radius is too small to create an arc connection - Arc(Point(-70.2116542364, -85.0434988054, 0.0), 232.983609646, 2.13382460853, 31.7956400527)
Radius is too small to create an arc connection - Arc(Point(25.1361453187, -81.7398017758, 0.0), 117.927469976, 2.88025248552, 120.111770053)
Radius is too small to create an arc connection - Arc(Point(18.4397803969, -78.4567676959, 0.0), 14.6047330537, 1.79233736431, -136.565493024)
Generating OBJ for monolane
Can't generate OBJ file for monolane. Command attempted:
/home/sanskar/git/drake/bazel-bin/drake/automotive/maliput/utility/yaml_to_obj -yaml_file="generated_worlds/city_monolane.yaml" -obj_dir="generated_worlds/" -obj_file="city_monolane"
/bin/sh: 1: /home/sanskar/git/drake/bazel-bin/drake/automotive/maliput/utility/yaml_to_obj: not found

The issue with the path here is that there is no directory called drake inside _bazelbin.

EDIT: Fixed the rndf_vis by building it. And tried modifying the path for the binary of yaml_to_obj through the city_generation_process.py file to get the absolute path where the binary exists. I get the following error now:

Building city using OsmCityBuilder
====================================
Statistics for city_1
====================================
Roads: 12
Intersections: 9
Lanes: 12
Buildings: 0
Blocks: 0
Polyline Geometry
  Waypoints: 59
  Intersections: 22
  Average waypoints: 4.91666666667
  Average intersections: 1.83333333333
Lines and Arcs Geometry
  Waypoints: 72
  Intersections: 25
  Average waypoints: 6.0
  Average intersections: 2.08333333333
====================================
Generating street plots
Generating RNDF file
Generating SVG for RNDF
Generating Gazebo 7 SDF
Generating Gazebo 8 SDF
Generating monolane file
Radius is too small to create an arc connection - Arc(Point(-70.2116542364, -85.0434988054, 0.0), 232.983609646, 2.13382460853, 31.7956400527)
Radius is too small to create an arc connection - Arc(Point(25.1361453187, -81.7398017758, 0.0), 117.927469976, 2.88025248552, 120.111770053)
Radius is too small to create an arc connection - Arc(Point(18.4397803969, -78.4567676959, 0.0), 14.6047330537, 1.79233736431, -136.565493024)
Generating OBJ for monolane
Can't generate OBJ file for monolane. Command attempted:
/home/sanskar/git/drake/bazel-bin/automotive/maliput/utility/yaml_to_obj -yaml_file="generated_worlds/city_monolane.yaml" -obj_dir="generated_worlds/" -obj_file="city_monolane"
[2019-01-30 14:00:45.088] [console] [info] Loading road geometry...
[2019-01-30 14:00:45.117] [console] [error] Unknown map.
abort: Failure at automotive/maliput/utility/yaml_to_obj.cc:87 in main().
Aborted (core dumped)

I am just getting started so any help would be appreciated.

basicNew commented 5 years ago

Hi @sanskarkatiyar , indeed that drake dir in the bazel_bin was wrong. About the error you are seeing in yaml_to_obj I'm almost certain this is because terminus generates monolane files, which have been deprecated in Drake and now uses multilane ones (see https://github.com/RobotLocomotion/drake/issues/9196 and https://github.com/RobotLocomotion/drake/tree/master/automotive/maliput/multilane). I can think of two things to do here:

Sorry I can't be of more help that that, we currently not doing any active development on this project.

cc @agalbachicar in case you have any comments on the monolane -> multilane migration path.

agalbachicar commented 5 years ago

I agree with @basicNew , those are good options to integrate monolane back and use yaml_to_obj. If you go for the second option, you may be interested in this specific PR where monolane is removed and this other PR where monolane is removed from the utility folder. By reverting those two, I think you will be able to build again and get the monolane OBJs.

A third option would be to do the migration from monolane yaml files to multilane equivalents. Here is the multilane yaml format which is similar to monolane's one. AFAIK, there is no documentation for monolane. A diff between the available samples within the multilane directory and those in monolane's would point out the main differences. Some that I can tell from the top of my head are:

Please let us know if there is anything else we can do to guide your migration.

sanskarkatiyar commented 5 years ago

Thanks a lot, @basicNew and @agalbachicar . Your comments are very helpful.

I also prefer the option to migrate the monolane to multilane and would post on this thread regarding the progress and other issues that come in the way.