Open aalghooneh opened 1 year ago
I am not sure why you are using v0.0.2 when the external build automatically grabs master
, which has all of these methods. Try the normal ROS build process, i.e.:
> catkin_make_isolated
> catkin_make
where you execute the first command from within external/
and the second from within ros/
.
thanks for the response,
I have used the v.0.0.2 tag, because with the master branch line 79, form receding_horizon_planner.cpp doesn't work.
class problem
does not have the method Solver() in its definition, but v.0.0.2 tag had it.
*static_cast<const ConcatenatedDynamicalSystem*>(&problem_->Solver().Dynamics());
For more information, this is what the catkin_make throws after catkin_make in ros/
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp: In member function ‘bool ilqgames::ilqgames_ros::RecedingHorizonPlanner::Initialize(const ros::NodeHandle&)’:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp:79:22: error: ‘using elementtype = class ilqgames::TopDownRenderableProblem {aka class ilqgames::TopDownRenderableProblem}’ has no member named ‘Solver’
&problem->Solver().Dynamics());
^~
In file included from /usr/local/include/ilqgames/ilqgames/dynamics/single_player_dubins_car.h:54:0,
from /home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp:43:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp: In member function ‘bool ilqgames::ilqgames_ros::RecedingHorizonPlanner::LoadParameters(const ros::NodeHandle&)’:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp:98:44: error: ‘using element_type = class ilqgames::TopDownRenderableProblem {aka class ilqgames::TopDownRenderableProblem}’ has no member named ‘Solver’
CHECK_EQ(statetopics.size(), problem_->Solver().Dynamics().NumPlayers());
^
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp: In member function ‘void ilqgames::ilqgames_ros::RecedingHorizonPlanner::Plan()’:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp:179:25: error: ‘using elementtype = class ilqgames::TopDownRenderableProblem {aka class ilqgames::TopDownRenderableProblem}’ has no member named ‘Solver’
VectorXf x0(problem->Solver().Dynamics().XDim());
^~
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp:204:30: error: ‘using elementtype = class ilqgames::TopDownRenderableProblem {aka class ilqgames::TopDownRenderableProblem}’ has no member named ‘Solve’
const auto log = problem->Solve(planner_runtime);
^~~~~
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp: In constructor ‘ilqgames_ros::ThreePlayerViconDemo::ThreePlayerViconDemo(const ros::NodeHandle&)’:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp:117:20: error: no matching function for call to ‘ilqgames::ConcatenatedDynamicalSystem::ConcatenatedDynamicalSystem(~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:60:3: note: candidate expects 1 argument, 2 provided
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate: ilqgames::ConcatenatedDynamicalSystem::ConcatenatedDynamicalSystem(const ilqgames::ConcatenatedDynamicalSystem&)
class ConcatenatedDynamicalSystem : public MultiPlayerDynamicalSystem {
^~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate expects 1 argument, 2 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp:131:78: error: no matching function for call to ‘ilqgames::OperatingPoint::OperatingPoint(const size_t&, ilqgames::PlayerIndex, double, const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:72:3: note: template argument deduction/substitution failed:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp:131:78: note: mismatched types ‘const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:68:3: note: candidate expects 3 arguments, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(const ilqgames::OperatingPoint&)
struct OperatingPoint {
^~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(ilqgames::OperatingPoint&&)
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp: In constructor ‘ilqgames_ros::TwoPlayerViconDemo::TwoPlayerViconDemo(const ros::NodeHandle&)’:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:108:78: error: no matching function for call to ‘ilqgames::ConcatenatedDynamicalSystem::ConcatenatedDynamicalSystem(~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:60:3: note: candidate expects 1 argument, 2 provided
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate: ilqgames::ConcatenatedDynamicalSystem::ConcatenatedDynamicalSystem(const ilqgames::ConcatenatedDynamicalSystem&)
class ConcatenatedDynamicalSystem : public MultiPlayerDynamicalSystem {
^~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate expects 1 argument, 2 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:122:78: error: no matching function for call to ‘ilqgames::OperatingPoint::OperatingPoint(const size_t&, ilqgames::PlayerIndex, double, const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:72:3: note: template argument deduction/substitution failed:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:122:78: note: mismatched types ‘const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:68:3: note: candidate expects 3 arguments, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(const ilqgames::OperatingPoint&)
struct OperatingPoint {
^~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(ilqgames::OperatingPoint&&)
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicondemo.cpp:239:3: error: ‘solver’ was not declared in this scope
solver_.reset(
^~~
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp:240:72: error: no matching function for call to ‘ilqgames::ILQSolver::ILQSolver(const std::shared_ptr~~~~
/usr/local/include/ilqgames/ilqgames/solver/ilq_solver.h:69:3: note: candidate expects 2 arguments, 3 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicondemo.cpp:201:3: error: ‘solver’ was not declared in this scope
solver_.reset(
^~~
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:202:63: error: no matching function for call to ‘ilqgames::ILQSolver::ILQSolver(const std::shared_ptr~~~~
/usr/local/include/ilqgames/ilqgames/solver/ilq_solver.h:69:3: note: candidate expects 2 arguments, 3 provided
ilqgames_ros/CMakeFiles/ilqgames_ros.dir/build.make:75: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/receding_horizon_planner.cpp.o' failed
make[2]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/receding_horizon_planner.cpp.o] Error 1
make[2]: Waiting for unfinished jobs....
ilqgames_ros/CMakeFiles/ilqgames_ros.dir/build.make:103: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/two_player_vicon_demo.cpp.o' failed
make[2]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/two_player_vicon_demo.cpp.o] Error 1
ilqgames_ros/CMakeFiles/ilqgames_ros.dir/build.make:89: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/three_player_vicon_demo.cpp.o' failed
make[2]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/three_player_vicon_demo.cpp.o] Error 1
CMakeFiles/Makefile2:1480: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/all' failed
make[1]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: [all] Error 2
Invoking "make -j16 -l16" failed
Oops. No idea at what point these diverged... but it appears to be a minor issue. If you inspect the header for the TopDownRenderableProblem
class, it appears that it directly has the Dynamics()
method so you can just splice out the ->Solver()
call. Apologies for the confusion.
Definitely stay on master
though because I'm sure there were some important changes that happened after v0.0.2
I'm afraid that wouldn't solve it, if I use dynamics directly it will output MultiPlayerIntegrableSystem type, and it cannot static_cast into ConcatenatedDynamicalSystem. This the whole error after removing Solver
there are also other erros, problem_ does not have NumPlayer() method
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/receding_horizon_planner.cpp:79:119: error: invalid static_cast from type ‘const std::shared_ptr~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:60:3: note: candidate expects 1 argument, 2 provided
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate: ilqgames::ConcatenatedDynamicalSystem::ConcatenatedDynamicalSystem(const ilqgames::ConcatenatedDynamicalSystem&)
class ConcatenatedDynamicalSystem : public MultiPlayerDynamicalSystem {
^~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate expects 1 argument, 2 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp:131:78: error: no matching function for call to ‘ilqgames::OperatingPoint::OperatingPoint(const size_t&, ilqgames::PlayerIndex, double, const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:72:3: note: template argument deduction/substitution failed:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp:131:78: note: mismatched types ‘const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:68:3: note: candidate expects 3 arguments, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(const ilqgames::OperatingPoint&)
struct OperatingPoint {
^~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(ilqgames::OperatingPoint&&)
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp: In constructor ‘ilqgames_ros::TwoPlayerViconDemo::TwoPlayerViconDemo(const ros::NodeHandle&)’:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:108:78: error: no matching function for call to ‘ilqgames::ConcatenatedDynamicalSystem::ConcatenatedDynamicalSystem(~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:60:3: note: candidate expects 1 argument, 2 provided
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate: ilqgames::ConcatenatedDynamicalSystem::ConcatenatedDynamicalSystem(const ilqgames::ConcatenatedDynamicalSystem&)
class ConcatenatedDynamicalSystem : public MultiPlayerDynamicalSystem {
^~~~~~~
/usr/local/include/ilqgames/ilqgames/dynamics/concatenated_dynamical_system.h:57:7: note: candidate expects 1 argument, 2 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:122:78: error: no matching function for call to ‘ilqgames::OperatingPoint::OperatingPoint(const size_t&, ilqgames::PlayerIndex, double, const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:72:3: note: template argument deduction/substitution failed:
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:122:78: note: mismatched types ‘const std::shared_ptr~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:68:3: note: candidate expects 3 arguments, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(const ilqgames::OperatingPoint&)
struct OperatingPoint {
^~~~~~
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate: ilqgames::OperatingPoint::OperatingPoint(ilqgames::OperatingPoint&&)
/usr/local/include/ilqgames/ilqgames/utils/operating_point.h:55:8: note: candidate expects 1 argument, 4 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicondemo.cpp:239:3: error: ‘solver’ was not declared in this scope
solver_.reset(
^~~
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/three_player_vicon_demo.cpp:240:72: error: no matching function for call to ‘ilqgames::ILQSolver::ILQSolver(const std::shared_ptr~~~~
/usr/local/include/ilqgames/ilqgames/solver/ilq_solver.h:69:3: note: candidate expects 2 arguments, 3 provided
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicondemo.cpp:201:3: error: ‘solver’ was not declared in this scope
solver_.reset(
^~~
/home/dastan/Documents/CODE/ilqg/ros_ws/ilqgames_ros/ros/src/ilqgames_ros/src/two_player_vicon_demo.cpp:202:63: error: no matching function for call to ‘ilqgames::ILQSolver::ILQSolver(const std::shared_ptr~~~~
/usr/local/include/ilqgames/ilqgames/solver/ilq_solver.h:69:3: note: candidate expects 2 arguments, 3 provided
ilqgames_ros/CMakeFiles/ilqgames_ros.dir/build.make:75: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/receding_horizon_planner.cpp.o' failed
make[2]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/receding_horizon_planner.cpp.o] Error 1
make[2]: Waiting for unfinished jobs....
ilqgames_ros/CMakeFiles/ilqgames_ros.dir/build.make:89: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/three_player_vicon_demo.cpp.o' failed
make[2]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/three_player_vicon_demo.cpp.o] Error 1
ilqgames_ros/CMakeFiles/ilqgames_ros.dir/build.make:103: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/two_player_vicon_demo.cpp.o' failed
make[2]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/src/two_player_vicon_demo.cpp.o] Error 1
CMakeFiles/Makefile2:1480: recipe for target 'ilqgames_ros/CMakeFiles/ilqgames_ros.dir/all' failed
make[1]: [ilqgames_ros/CMakeFiles/ilqgames_ros.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: [all] Error 2
Invoking "make -j16 -l16" failed
As you can see from the inheritance diagram (https://hjreachability.github.io/ilqgames/documentation/html/classilqgames_1_1_concatenated_dynamical_system.html), the ConcatenatedDynamicalSystem
class is derived from the MultiPlayerIntegrableSystem
class, and hence should be up-castable. The error is most likely because you are either casting a shared_ptr
to a raw pointer. You need to use shared_ptr<>.get()
to access the raw pointer. Likewise, you can access the number of players also from the dynamics class directly. Again, apologies for the confusion and if you open a PR to fix these issues I will be much obliged.
thanks! I would be happy to! One last question, is there any plan to release an update to address these issues anytime soon?
Lol once your PR lands ;)
The backstory on this repository is that it was created during a sprint for a demo that happened in October 2019, and has not been touched since then. The main ilqgames
repo was actively developed through fall 2020 and has not seen significant changes since then, apart from a few minor tweaks in fall 2021. Most of our efforts have been focused on other related projects in the Julia language. For an example: https://github.com/lassepe/LiftedTrajectoryGames.jl
oh! Thanks for all the help then David, I will follow up with you
Hi
thanks for sharing your code,
I think you referenced methods that doesn't exist in the "https://github.com/HJReachability/ilqgames/tree/v0.0.2"
in receding_horizon_planner.cpp for example, this type
const ConcatenatedDynamicalSystem& dynamics,
doesn't have this method
SubsystemXDim(ii),
hence the ros package cannot be built, also when somebody tries to build the external package it clones v.0.0.1 instead of v.0.0.2 and the methods won't match for compilation. It would be great if you tell us which version matches with this rosnode
in the script, line 216, the Splice method need time argument as well for v.0.0.2
such case is also for the two other scripts, in
three_player_vicon_demo.cpp
line 114 uses an overload ofConcatenatedDynamicalSystem
that doesnt exist in the class definition.it would be great if you could address these