-
Notifications
You must be signed in to change notification settings - Fork 586
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
Cppbuild Control Callback Error #771
Comments
I think the issue may be that libfrankaConfig adds the following methods to Robot.java: But according to my research, this method is defined where ControlCallback is passed by reference in jnilibfranka.cpp:
|
Please try to use the Parser to see how it maps it |
To map an instance of std::function, please try something like bytedeco/javacpp-presets#1051 (comment) |
We are trying to wrap Franka Emika's libfranka library, but are getting this issue when defining a class called ControlCallback in our libfrankaConfig.java file. We have the following code:
In libfranka, ControlCallback represents an argument in the Robot class's control method. It should be of type std::function<franka::Torques(const franka::RobotState&, franka::Duration)>. We get the following error during runs of cppbuild.bash:
In function ‘void Java_us_ihmc_libfranka_Robot_control__Lus_ihmc_libfranka_libfrankaConfig_00024ControlCallback_2(JNIEnv*, jobject, jobject)’: error: no matching function for call to ‘franka::Robot::control(JavaCPP_us_ihmc_libfranka_libfrankaConfig_00024ControlCallback&)’ 5293 | ptr->control(*ptr0); | ^ In file included from /home/franka/IdeaProjects/repository-group/libfranka-java/cppbuild/include/franka/model.h:8, note: candidate: ‘void franka::Robot::control(std::function<franka::Torques(const franka::RobotState&, franka::Duration)>, bool, double)’ 172 | void control(std::function<Torques(const RobotState&, franka::Duration)> control_callback, | ^~~~~~~ no known conversion for argument 1 from ‘JavaCPP_us_ihmc_libfranka_libfrankaConfig_00024ControlCallback’ to ‘std::function<franka::Torques(const franka::RobotState&, franka::Duration)>’ 172 | void control(std::function<Torques(const RobotState&, franka::Duration)> control_callback,
The text was updated successfully, but these errors were encountered: