Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Use interactive markers to control iiwa14 joints #3

Merged
merged 33 commits into from
Dec 3, 2020
Merged

Conversation

sloretz
Copy link
Owner

@sloretz sloretz commented Sep 1, 2020

Add Demo using interactive markers to control iiwa14 in drake.

Peek 2020-10-19 13-54

This uses pydrake systems framework, the manipulation station, and ROS 2 Rolling with ros/sdformat_urdf#1 to control the robot in joint space with interactive markers on each joint.

@IanTheEngineer FYI - see interactive_demo.py

Roughly to run this:

  1. Build a ROS 2 workspace with Initial urdf parser plugin that parses sdformat ros/sdformat_urdf#1 and source it in a terminal
  2. Download the latest binary install of drake
  3. Use @EricCousineau-TRI's trick of python3 -m venv --system-site-packages path/to/extracted/drake and activate the venv to make Drake usable from that terminal
  4. In another terminal activate the venv and run drake-visualizer
  5. In another terminal activate the venv and run rviz2 -d path/to/this/repo/view.rviz
  6. Run python3 ./interactive_demo.py

@sloretz sloretz self-assigned this Sep 1, 2020
@sloretz sloretz marked this pull request as draft September 1, 2020 16:20
@sloretz sloretz changed the title Whatever is here - segfaults Whatever is here - controls robot - ish Sep 2, 2020
@sloretz sloretz changed the title Whatever is here - controls robot - ish Use interactive markers to control iiwa14 joints Oct 19, 2020
@sloretz sloretz marked this pull request as ready for review October 19, 2020 21:06
@sloretz
Copy link
Owner Author

sloretz commented Oct 20, 2020

@EricCousineau-TRI @azeey mind having a look?

@EricCousineau-TRI
Copy link

Taking a look now!

Copy link

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

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

Will run it on my machine

iiwa14_no_collision.sdf.in Outdated Show resolved Hide resolved
interactive_demo.py Outdated Show resolved Hide resolved
interactive_demo.py Outdated Show resolved Hide resolved
interactive_demo.py Show resolved Hide resolved
iiwa14_no_collision.sdf.in Outdated Show resolved Hide resolved
drake_ros/drake_ros/systems/__init__.py Outdated Show resolved Hide resolved
drake_ros/drake_ros/systems/__init__.py Outdated Show resolved Hide resolved
interactive_demo.py Show resolved Hide resolved
interactive_demo.py Show resolved Hide resolved
interactive_demo.py Show resolved Hide resolved
Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

LGTM! I was able to run this locally (in docker) after fixing a couple of issues I found (mentioned in comments). Given that this is a prototype, feel free to ignore some of my comments. As a general comment, I wonder how hard it would be to just publish joint states and use the Robot state publisher to do the TF computation instead of having the TFPublisher system here. This would further exercise the sdformat_urdf package

drake_ros/drake_ros/systems/movable_joints.py Outdated Show resolved Hide resolved
drake_ros/drake_ros/systems/movable_point.py Outdated Show resolved Hide resolved
interactive_demo.py Outdated Show resolved Hide resolved
@sloretz
Copy link
Owner Author

sloretz commented Nov 16, 2020

@EricCousineau-TRI @azeey Feedback has been addressed. Mind taking another look?

Copy link

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

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

Can you use .gitattributes to suppress diffs for .obj files here?
https://github.com/RobotLocomotion/drake/blob/4731f31ad39753dfde25611456e55f98d027d469/.gitattributes

Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

LGTM. Mind adding the AMENT_PREFIX_PATH stuff to the README as well?

@sloretz
Copy link
Owner Author

sloretz commented Nov 30, 2020

Can you use .gitattributes to suppress diffs for .obj files here?

Suppressed in f07b054

Signed-off-by: Shane Loretz <[email protected]>
Quickly gets stuck in singularity
Maybe add routine to re-home robot in joint space when Diff_ik fails?

Signed-off-by: Shane Loretz<[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
sloretz and others added 20 commits November 30, 2020 11:51
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Uses stub package.xml files and an extra ament index to convince both
ROS and Drake that the SDFormat XML files and meshes live in a ROS
package. This allows using `package://` URLs instead of the temporary
file made from populating a template with absolute `file://` URIs.

To launch:
AMENT_PREFIX_PATH="$AMENT_PREFIX_PATH:$(pwd)" python3 ros2_demo.py
AMENT_PREFIX_PATH="$AMENT_PREFIX_PATH:$(pwd)" rviz2 -d view.rviz

Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Gets rid of templated sdformat file

To launch:
AMENT_PREFIX_PATH="$AMENT_PREFIX_PATH:$(pwd)" python3 interactive_demo.py
AMENT_PREFIX_PATH="$AMENT_PREFIX_PATH:$(pwd)" rviz2 -d interactive_demo.rviz

Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
@sloretz
Copy link
Owner Author

sloretz commented Nov 30, 2020

LGTM. Mind adding the AMENT_PREFIX_PATH stuff to the README as well?

Rebased and updated the README in 4bd74d1

@sloretz
Copy link
Owner Author

sloretz commented Nov 30, 2020

It looks like all the comments have been addressed. Since this is a prototype repo, I'm inclined to merge after giving a day or so for additional reviews.

@sloretz
Copy link
Owner Author

sloretz commented Dec 3, 2020

Seemed like there was no opposition to merging in yesterday's meeting, so merging 🎉

@sloretz sloretz merged commit 3bb1c5c into master Dec 3, 2020
@sloretz sloretz deleted the interactive_demo branch December 3, 2020 00:20
@EricCousineau-TRI
Copy link

Sweet, thank you!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants