Skip to content
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

Drake path cannot find utlity/yaml_to_obj #265

Open
sanskarkatiyar opened this issue Jan 30, 2019 · 3 comments
Open

Drake path cannot find utlity/yaml_to_obj #265

sanskarkatiyar opened this issue Jan 30, 2019 · 3 comments

Comments

@sanskarkatiyar
Copy link

sanskarkatiyar commented Jan 30, 2019

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 bazel_bin.

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
Copy link
Contributor

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 RobotLocomotion/drake#9196 and https://github.com/RobotLocomotion/drake/tree/master/automotive/maliput/multilane). I can think of two things to do here:

  • Get a drake checkout of master of about June 2017, which is the time we were building against. This should get things working, although you would be missing almost two years of improvements in Drake.
  • Make the required changes on the yaml generator so it generates multilane files instead of monolane ones. Given that multilane is a superset of monolane (and was conceived to be backwards compatible) I think the changes should be minor (but you will have to play around a little bit).

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
Copy link
Member

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:

  • Builder node specifies lane_width, right and left shoulders instead of lane_bounds and driveable_bounds
  • Builder node adds scale_length (you'll generally want to set it to 1.0 )
  • Builder node adds computation-policy. prefer-speed would provide the same output as monolane.
  • Points might not have theta_dot. However, I recommend keeping the same output as the terminus generator.
  • Connection node adds lanes array. You should set it to [1, 0., 0.] to keep it backwards compatible.
  • Connection node start, z_end and explicit_end changed. I recommend you to take a look at the documentation to understand how it exactly changed. My hint hear is to use the ref keyword as you'll be connecting reference-to-reference curves which are coincident with lane-to-lane curves for monolane.

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

@sanskarkatiyar
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants