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

Rework base robot classes and add Kuka iiwa Med support #60

Merged
merged 10 commits into from
May 17, 2021
Merged

Conversation

mvandermerwe
Copy link
Contributor

@mvandermerwe mvandermerwe commented May 14, 2021

Updated robot base classes to be more flexible for single arm configurations and for different gripper APIs. All dual arm and gripper helper functions have been moved to the Base[Robot] or [Robot] classes. The API for Victor/Val should be unchanged. Also introduces the BaseMed/Med robot abstractions. victor_basic_motion and val_basic_motion perform as expected in Gazebo.

</include>

<!-- ROS control for real victor, does nothing at the moment -->
<!-- <include file="$(find victor_control)/launch/victor_control.launch"> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change or remove.
We'll never want to launch victor_control.launch from this med.launch file

@@ -0,0 +1,152 @@
#! /usr/bin/env python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to move manual motion to the "Kuka Hardware Interface" package.
#61
UM-ARM-Lab/kuka_iiwa_interface#130

We could revisit that decision. Regardless, I like manual motion better from a launch file

Copy link
Contributor

@PeterMitrano PeterMitrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to test this before we merge, but not right now. Feel free to nag me to test if I haven't done it soon

arm_robots/launch/med.launch Outdated Show resolved Hide resolved
<group if="$(arg sim)">
<!-- Start gazebo -->
<group> <!-- this empty group tag creates a scope for the "remap" command -->
<!-- because we use ros_control only for the joints of the arms, not the grippers,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arms -> arm
grippers -> gripper

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, we don't need this remapping, so I've removed the group/remap entirely.

args="-urdf -model med -param robot_description"/>

<!-- start the ROS controllers, only used in gazebo. This merges gripper and arm joint states -->
<include file="$(find victor_control)/launch/med_control_gazebo.launch">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this under victor_control ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because for now I've been throwing the med configs into the kuka_iiwa_interface existing packages. On my todo list today is to pull all these med configs/launches out into their own packages that rely on your kuka_iiwa_interface packages.

</include>
</group>
<group unless="$(arg sim)">
<!-- Start gazebo -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with this being commented out? should we just delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is b/c I'm not sure yet how we will update the planning scene, and I may want to use Gazebo to do it, the way you guys do. I want to keep it for now and will remove it if we decide to go a different route.

arm_robots/launch/med.launch Outdated Show resolved Hide resolved
@@ -0,0 +1,20 @@
import numpy as np
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you're not starting from existing code like we were, I'd encourage you to get rid of this file if possible. Most of this stuff is already available on the parameter server, so looking it up would make things simpler and reduce duplication of hard-coded values. Look at the yaml/config files, or srdf file for where this stuff might belong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you guys have a plan to shift away from this setup? I can imagine adding a get_joint_limits() function to the MoveItEnabledRobot class to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then each subclass would need to implement it according to their arms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARM_JOINT_NAMES is the most problematic part. That should just be based on a move_group., which you can get via the robot_commander. But that breaks the assumption that BaseVictor (for instance) doesn't depend on MoveIt. So calling it MoveitEnabledRobot doesn't make sense, not sure what the distinction between Base and Movet robot should be, if indeed there should be one at all?

as for the vel/accel limits, again those can be retreived from the parameter server, and there's probably API on RobotCommander or somewhere else in moveit to get that info

Ideally our get_joint_limits would be a wrapper to some existing moveit function call? not sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, well for vel/accel limits, it seems to make sense to have that in MoveItEnabledRobot and use the RobotCommander or similar to get access. Maybe that can be a separate PR?

It's not immediately clear to me how to address the ARM_JOINT_NAMES issue, but it also seems like something both Victor/Med suffer from. Maybe enough for now to open an issue and explore options later?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already is an issue:
#14

I agree this change is tangential to your refactor, and should be solved in a separate PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

arm_robots/src/arm_robots/med.py Outdated Show resolved Hide resolved
arm_robots/src/arm_robots/med.py Outdated Show resolved Hide resolved
arm_robots/src/arm_robots/med.py Outdated Show resolved Hide resolved
arm_robots/src/arm_robots/med.py Outdated Show resolved Hide resolved
@PeterMitrano
Copy link
Contributor

PeterMitrano commented May 17, 2021

This requires the wsg50 packages to run, where should we get those?

@mvandermerwe
Copy link
Contributor Author

This requires the wsg50 packages to run, where should we get those?

We have a public fork on the MMintlab github: https://github.com/MMintLab/wsg50-ros-pkg. We only use the services published by these packages, no code dependencies.

@mvandermerwe mvandermerwe merged commit 9e1fabc into master May 17, 2021
@bsaund
Copy link
Contributor

bsaund commented May 18, 2021

@mvandermerwe I would like to drop the wsg50-ros-pkg requirement for stacks not using the Med robot (e.g. all of armlab).

@mvandermerwe mvandermerwe deleted the med branch December 4, 2023 20:43
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

Successfully merging this pull request may close these issues.

3 participants