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

Kortex API movement does not work in Gazebo. Noetic-ROS #191

Closed
alexlt97 opened this issue Sep 14, 2021 · 3 comments
Closed

Kortex API movement does not work in Gazebo. Noetic-ROS #191

alexlt97 opened this issue Sep 14, 2021 · 3 comments

Comments

@alexlt97
Copy link

alexlt97 commented Sep 14, 2021

Description

Good morning, I was trying to use the gazebo examples combined with the examples of movement. My idea is to learn how to use KINOVA API so I can create my own nodes but it looks that in gazebo the robot (I tried with both models) does not respond
to the movement commands, however, it does to open the gripper commandself.example_send_gripper_command(0.0) and the initial movement that moves the robot to HOME from the node home_robot.py called in kortex_gazebo spawn_kortex_robot.launch. Do I need to change something inside the .launch files?

Version

ROS distribution : Noetic

Branch and commit you are using : noetic-devel last commit

Steps to reproduce

  1. roslaunch kortex_gazebo spawn_kortex_robot.launch
  2. roslaunch kortex_examples full_arm_movement_python.launch

Expected behavior

The robot follows the movement examples from kortex_examples full_arm_movement_python.launch in simulation as it does in the real robot.

Any other information

I have no problems using the API in the real robot.

The simulation works with the node example_cartesian_poses_with_notifications_cpp but not with the full example.

@felixmaisonneuve
Copy link
Contributor

Hi @alexlt97,

The current full_arm_movement_python.launch does not work when working with a Gazebo simulation.

The API call used to move the arm has changed with the release 2.3. It was previously using PlayCartesianTrajectory and PlayJointTrajectory (now deprecated). The API is now using ExecuteWaypointTrajectory.

You can see how our simulation stack works in this readme, but basically each call of the API has to be implemented manually to simulated the expected behaviour in Gazebo. The ones that are not implemented will return a default response and a warning.

What happens here is that the examples has been updated to use the current ExecuteWaypointTrajectory, but this API call has not been implemented in our simulation stack, so it is not working in Gazebo. In Gazebo, only the previous PlayCartesianTrajectory and PlayJointTrajectory have been implemented.

What you could do is use an old version of the example source file (one that is using PlayCartesianTrajectory and PlayJointTrajectory). You would have to look to any commit before f0218097604a902cf8bfc65db64ef3aa5eefb455 (which is when the 2.3 release was merged on June 4). You could also look at PR #179, where (some of) the deprecated calls were updated. You would have to revert these changes to use the old calls again.

If you take an old example_full_arm_movement.py file, it is possible some calls will be incompatible, but it shouldn't be too much trouble to make it work. Also, you will probably be able to use it on a real robot, but you will get some warnings when using deprecated API calls.

Try using an old example and let me know how it goes,
Felix

@alexlt97
Copy link
Author

Ok as you said it works with the previous functions,

Are you planning to update the simulator to include the new features of the API?

@felixmaisonneuve
Copy link
Contributor

Hi @alexlt97,

Sorry for the delay.
Updating the simulator is certainly something that would improve the current repo. Now that we have updated the simulator, it makes sense to also update the simulator.

However, this would require a bit of work, so I don't have a date to give you.

Best,
Felix

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

2 participants