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

Data preparation #6

Open
aopolin-lv opened this issue Oct 22, 2024 · 1 comment
Open

Data preparation #6

aopolin-lv opened this issue Oct 22, 2024 · 1 comment

Comments

@aopolin-lv
Copy link

Hello, ggik is a nice work. I have a question that need you help.
If I have a urdf file of a specified robot arm, and many joint-ee pairs data. How can I train a ggik model using that data? Do you have suggestions?

@Olimoyo
Copy link
Member

Olimoyo commented Nov 15, 2024

Hi, thank you for your interest in our work! If your robot is custom, you would need to represent your robot graphically using this repository: https://github.com/utiasSTARS/GraphIK.

Then you can generate data by following the script here. In particular, you can see that we can generate data by loading a few different robots in lines:

for robot_name in robots:
# generate data for robot like ur10, kuka etc.
if robot_name == "ur10":
# randomize won't work on ur10
# robot, graph = load_ur10(limits=None, randomized_links = False)
fname = graphik.__path__[0] + "/robots/urdfs/ur10_mod.urdf"
q_lim_l = -np.pi * np.ones(6)
q_lim_u = np.pi * np.ones(6)
elif robot_name == "kuka":
# robot, graph = load_kuka(limits=None, randomized_links = params["randomize"], randomize_percentage=0.2)
fname = graphik.__path__[0] + "/robots/urdfs/kuka_iiwr.urdf"
q_lim_l = -np.pi * np.ones(7)
q_lim_u = np.pi * np.ones(7)
elif robot_name == "lwa4d":
# robot, graph = load_schunk_lwa4d(limits=None, randomized_links = params["randomize"], randomize_percentage=0.2)
fname = graphik.__path__[0] + "/robots/urdfs/lwa4d.urdf"
q_lim_l = -np.pi * np.ones(7)
q_lim_u = np.pi * np.ones(7)
elif robot_name == "panda":
# robot, graph = load_schunk_lwa4d(limits=None, randomized_links = params["randomize"], randomize_percentage=0.2)
fname = graphik.__path__[0] + "/robots/urdfs/panda_arm.urdf"
# q_lim_l = -np.pi * np.ones(7)
# q_lim_u = np.pi * np.ones(7)
q_lim_l = np.array([-2.8973, -1.7628, -2.8973, -3.0718, -2.8973, -0.0175, -2.8973])
q_lim_u = np.array([2.8973, 1.7628, 2.8973, -0.0698, 2.8973, 3.7525, 2.8973])
elif robot_name == "lwa4p":
# robot, graph = load_schunk_lwa4p(limits=None, randomized_links = params["randomize"], randomize_percentage=0.2)
fname = graphik.__path__[0] + "/robots/urdfs/lwa4p.urdf"
q_lim_l = -np.pi * np.ones(6)
q_lim_u = np.pi * np.ones(6)
else:
raise NotImplementedError

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