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

Using the gen3_lite robot, how to get the position and velocity feedback of the robot in the method of waypoint_trajectory point trajectory planning? #183

Closed
xh16166 opened this issue Aug 24, 2023 · 1 comment

Comments

@xh16166
Copy link

xh16166 commented Aug 24, 2023

Dear Kinova team,

I am currently learning how to use the Kinova Gen3 Lite robot for trajectory planning. I would like to perform point trajectory planning based on the official tutorial 110_WayPoints. Additionally, I hope to receive feedback from the robot while it is in motion, such as joint angles and velocities. However, I am not sure how to obtain feedback information when the robot is performing WayPoints motion. Therefore, I would like to ask how to write a program and if there is a specific reference example available. Thank you very much.

Best regards,
xh

@felixmaisonneuve
Copy link
Contributor

Hi @xh16166,

Sory for the delay,

The first thing you would need to do is create a "router_realtime" (with a UDP connection) and create a BaseCyclic object. Like this :
https://github.com/Kinovarobotics/kortex/blob/6f557a8c65d5b5d8e83bf4966604788a05713658/api_cpp/examples/200-Actuator_low_level_control/01-actuator_low_level_velocity_control.cpp#L250-L275

Then, in your code, you can use your BaseCyclic to fetch feedback by calling k_api::BaseCyclic::Feedback base_feedback = base_cyclic->RefreshFeedback();

From the feedback, you can access all the data you want for the base, every actuator and the interconnect. Refer to the Feedback page for more details.

With that, you can either create a thread that runs at the same time as your waypoint thread on create a loop after sending your WaypointList and fetch feedback every ms.

I went over it a bit fast. If you have any questions, I will be happy to help 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

3 participants