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

How to change the position of base link of the robot? #12

Open
mohitydv09 opened this issue Jun 12, 2024 · 3 comments
Open

How to change the position of base link of the robot? #12

mohitydv09 opened this issue Jun 12, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@mohitydv09
Copy link

I want the robot to be placed at a specific position in the environment so that I can manually build the world around it using vamp.Environment(). I tried modifying the URDF file, but it doesn't seem to affect the robot's interpreted position in the code. Specifically, I want the robot to be located at a particular position in the environment, for example, pos: [1.0, 0.0, 0.0], when I initiate it with vamp.ur5.

The PyBullet simulation uses the URDF file, so I was able to change the robot's location by modifying the origin of the base_link in the URDF. However, the vamp module seems to be using the robot's original spawn location from the URDF, despite my changes.

In the code below, I have modified the provided URDF to spawn the UR5e at the origin. Although PyBullet loads the URDF correctly, the robot_module still interprets the robot as being at the old location:

robot_urdf_path = 'resources/ur5/ur5.urdf'
sim = vpb.PyBulletSimulator(robot_urdf_path, vamp.ROBOT_JOINTS['ur5'], True)
robot_module = vamp.configure_robot_and_planner_with_kwargs('ur5', 'rrtc')[0]
curr_config = robot_module.Configuration().to_list()
collision_spheres = robot_module.fk(curr_config)

for sphere in collision_spheres:
    sim.add_sphere(sphere.r, [sphere.x, sphere.y, sphere.z])
time.sleep(60)

image

How do I make the code interpret robot at the location I want?

@mohitydv09 mohitydv09 changed the title How to change the posistion of base link of the robot? How to change the position of base link of the robot? Jun 12, 2024
@wbthomason
Copy link
Contributor

We currently assume that the robot base is at the origin, and transform the environment to the robot's frame so that this is true. That said, this isn't any sort of fundamental limitation of vamp; we will add support for arbitrary base poses for all supported robots in a future update.

@wbthomason wbthomason added the enhancement New feature or request label Jun 12, 2024
@wbthomason wbthomason self-assigned this Jun 12, 2024
@mohitydv09
Copy link
Author

Okay, it would be a nice addition. Thank-you for your response.

@wbthomason
Copy link
Contributor

Re-opening to track the feature to add.

@wbthomason wbthomason reopened this Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants