You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to include action client to a moveit code, I want to call the server after excuting motion command.
I do not know how to instantiate the client using RobotiqActionClient gripper = new RobotiqActionClient(action_name, wait_for_server);
When I put this inside main(), or outside of any function, the error says:
conversion from ‘RobotiqActionClient* {aka robotiq_2f_gripper_control::RobotiqActionClient*}’ to non-scalar type ‘RobotiqActionClient {aka robotiq_2f_gripper_control::RobotiqActionClient}’ requested
Could you give any hint?
The text was updated successfully, but these errors were encountered:
Hi @DavidYaonanZhu, Sorry for the late answer I no longer support these packages often.
Your error is more C++ related than to the Class itself. The new operator in C++ returns a pointer to an instance object, that is why the non-scalar casting error pops up. You are trying to fit a pointer into a structure or class instance which is wrong.
You can instantiate the object and keep it referenced through a pointer:
RobotiqActionClient* your_gripper = new RobotiqActionClient(...)
Hi, thanks for your wonderful driver.
I want to include action client to a moveit code, I want to call the server after excuting motion command.
I do not know how to instantiate the client using RobotiqActionClient gripper = new RobotiqActionClient(action_name, wait_for_server);
When I put this inside main(), or outside of any function, the error says:
conversion from ‘RobotiqActionClient* {aka robotiq_2f_gripper_control::RobotiqActionClient*}’ to non-scalar type ‘RobotiqActionClient {aka robotiq_2f_gripper_control::RobotiqActionClient}’ requested
Could you give any hint?
The text was updated successfully, but these errors were encountered: