jsk-ros-pkg / jsk_control

jsk control ros packages
http://github.com/jsk-ros-pkg/jsk_control
13 stars 51 forks source link

Replace FootstepState::Ptr to StatePtr in footstep_astar_solver to be used with a GraphT which has different state type #692

Closed orikuma closed 6 years ago

orikuma commented 6 years ago

Problem: When a FootstepAstarSolver instance is generated with GraphT which has a different state type from FootstepState, a compilation error occurs because there are some hard-coded FootstepState::Ptr in its member functions.

Proposed solution: I replaced hard-coded FootstepState::Ptr to StatePtr, which is defined in FootstepAstarSolver and equivalent to GraphT::StateT::Ptr, in order to refer the state type used in GraphT. I assume that the behavior of a FootstepAstarSolver with a FootstepGraph is not changed by this PR.

orikuma commented 6 years ago

I want to use a class which inherits FootstepState for additional features, which include some closed codes.

YoheiKakiuchi commented 6 years ago

I want to use a class which inherits FootstepState

Is it require to change FootstepGraph.h

orikuma commented 6 years ago

It does not require to change FootstepGraph. (I use different graph class, which has some functions with same name as FootstepGraph but different process for closed programs)

YoheiKakiuchi commented 6 years ago

So, I think you are happy to make new aster class.

orikuma commented 6 years ago

Thank you for merging. (At first, I consider to inherit AstarSolver class but it become almost same as FootstepAstarSolver.)