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

Failed to call update polygon service #41

Closed
jaredjohansen opened this issue Dec 21, 2018 · 6 comments
Closed

Failed to call update polygon service #41

jaredjohansen opened this issue Dec 21, 2018 · 6 comments

Comments

@jaredjohansen
Copy link

I am getting the following error when attempting to use frontier_exploration:

[ WARN] [1545419265.256089445, 1688.620000000]: Please select an initial point for exploration inside the polygon
[ INFO] [1545419266.483870438, 1689.850000000]: Sending goal
[ERROR] [1545419266.499376502, 1689.870000000]: Failed to call update polygon service.
Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap! You should delete your objects before attempting to unload the library or destroying the ClassLoader. The library will NOT be unloaded.
         at line 122 in /tmp/binarydeb/ros-melodic-class-loader-0.4.1/src/class_loader.cpp

A few notes about my environment:

  • I am running ROS melodic.
  • Because frontier_exploration relies on tf instead of tf2 (specifically in its use of costmap_2d in the navigation ros package), I rolled back the navigation package about 5 months (before the costmap_2d package was updated to tf2).
  • I am attempting to run the husky exploration demo (http://www.clearpathrobotics.com/assets/guides/husky/HuskyFrontiers.html#instructions). Their exploration.launch hasn't been updated to the new naming/organization scheme of frontier_exploration, so I updated the nodes in exploration.launch to fit the new naming/organization scheme. Likewise, their costmap_exploration uses the old BoundedExploreLayer rather than the new PolygonLayer, so I updated that as well.

After making these changes, I am able to get my workspace to compile. I am able to run the exploration_demo.launch without any errors. I am able to select points in rviz without any errors. I am able to complete the polygon without any errors. I am able to select a point to initialize the exploration without any errors. But when it tries to communicate with the polygon service, things die.

The mechanisms for how it uses the service and communicates with the other nodes is a bit beyond my initial attempts to understand. Any help to understand (or to fix any bugs that may be involved) would be appreciated!

@paulbovbel
Copy link
Owner

Thanks for taking it for a spin - frontier_exploration in melodic has undergone a pretty significant refactor, and I'm still shuffling things around.

@jaredjohansen
Copy link
Author

@paulbovbel - thanks for providing/maintaining this package.

Do you have an ETC for when the reshuffle will be done?

@paulbovbel
Copy link
Owner

Not really. Can you link me to a fork of something of husky with the updated launch you put together? Might be a good staging ground.

@jaredjohansen
Copy link
Author

Sorry for the long delay, @paulbovbel. (I got called off on something else for a couple of weeks.)

I started looking into this again, today. My original costmap_exploration.yaml file looked like this:

track_unknown_space: true
global_frame: map
rolling_window: false

plugins:
- {name: external,            type: "costmap_2d::StaticLayer"}
- {name: explore_boundary,    type: "frontier_exploration::BoundedExploreLayer"}
#Can disable sensor layer if gmapping is fast enough to update scans
- {name: obstacles_laser,     type: "costmap_2d::ObstacleLayer"}
- {name: inflation,           type: "costmap_2d::InflationLayer"}

explore_boundary:
 resize_to_boundary: false
 frontier_travel_point: middle
 #set to false for gmapping, true if re-exploring a known area
 explore_clear_space: false

And my costmap_common.yaml looked like this:

footprint: [[-0.5, -0.33], [-0.5, 0.33], [0.65, 0.33], [0.65, -0.33]]
footprint_padding: 0.02

robot_base_frame: base_link
update_frequency: 1.0
publish_frequency: 3.0
transform_tolerance: 0.5

resolution: 0.05

obstacle_range: 5.5
raytrace_range: 6.0

#layer definitions
static:
   map_topic: /map
   subscribe_to_updates: true

obstacles_laser:
   observation_sources: laser
   laser: {data_type: LaserScan, clearing: true, marking: true, topic: scan, inf_is_valid: true}

inflation:
   inflation_radius: 1.0
   cost_scaling_factor: 2.0

I found that the frontier_exploration::BoundedExploreLayer didn't exist anymore, so I had updated it the file to this (which caused the "failed to update polygon service" error):

track_unknown_space: true
global_frame: map
rolling_window: false

plugins:
- {name: external,            type: "costmap_2d::StaticLayer"}
- {name: explore_boundary,    type: "polygon_layer::PolygonLayer"}
#Can disable sensor layer if gmapping is fast enough to update scans
- {name: obstacles_laser,     type: "costmap_2d::ObstacleLayer"}
- {name: inflation,           type: "costmap_2d::InflationLayer"}

explore_boundary:
 resize_to_boundary: false
 frontier_travel_point: middle
 #set to false for gmapping, true if re-exploring a known area
 explore_clear_space: false

That brings us to today, when I did some more digging. From the digging, I updated the file to this:

track_unknown_space: true
global_frame: map
rolling_window: false

plugins:
- {name: static,              type: "costmap_2d::StaticLayer"}
- {name: polygon_layer,       type: "polygon_layer::PolygonLayer"}
#Can disable sensor layer if gmapping is fast enough to update scans
- {name: obstacles_laser,     type: "costmap_2d::ObstacleLayer"}
- {name: inflation,           type: "costmap_2d::InflationLayer"}

polygon_layer:
 resize_to_polygon: false
 frontier_travel_point: middle
 #set to false for gmapping, true if re-exploring a known area
 explore_clear_space: false

With this latest update, I think that all my layers (and parameters) are named properly. It succesfully gets past the line that was triggering the "Failed to call update polygon service" error. So, in short, problem solved!

(It now gets stuck on something else...but I'll ask about that in a separate issue.)

@erinline
Copy link

erinline commented Mar 4, 2019

@jaredjohansen regarding:

I am attempting to run the husky exploration demo (http://www.clearpathrobotics.com/assets/guides/husky/HuskyFrontiers.html#instructions). Their exploration.launch hasn't been updated to the new naming/organization scheme of frontier_exploration, so I updated the nodes in exploration.launch to fit the new naming/organization scheme. Likewise, their costmap_exploration uses the old BoundedExploreLayer rather than the new PolygonLayer, so I updated that as well.

What change did you make to the nodes in exploration.launch to fit the new naming/organization scheme? I am trying to do the same thing, but new to ROS and simply renaming the nodes in the launch file did not work for me. (I may have the new names wrong as well- I assume explore_server is now exploration_server and explore_client is now plugin_client, is that correct?)

Perhaps you could post your file, exploration.launch?

@erinline
Copy link

erinline commented Mar 5, 2019

Nevermind, figured it out from looking at the frontier_exploration package's exploration.launch. In case anyone else has the same question, the nodes' packages have to be changed as well. These are the relevant lines in husky_navigation/launch/exploration.launch, modified to work with the latest frontier_exploration package:
<node pkg="exploration_server" type="plugin_client" name="explore_client" output="screen"/> <node pkg="exploration_server" type="exploration_server_node" name="explore_server" .../>

(And of course you also have to make the changes to costmap_exploration.yaml mentioned above by @jaredjohansen )

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