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

Add multirobot example #46

Closed

Conversation

gbiggs
Copy link
Collaborator

@gbiggs gbiggs commented Mar 4, 2022

This PR adds a multirobot example using Drake-ROS. It creates a two-dimensional array of Kuka LBR iiwa robots, which can then be visualised using rviz.

See the README.md file for how to run the example.

Questions that need answering:

  • Should the iiwa_description directory be made its own package? (Or, is it already a package somewhere that we can use?)
  • Should we add a C++ version of the sample as well?
  • Is "the robots all fall down due to gravity" a sufficient example, or should the robots do something?

This change is Reviewable

Copy link
Collaborator

@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.

Reviewable status: 0 of 62 files reviewed, 2 unresolved discussions (waiting on @EricCousineau-TRI and @gbiggs)

a discussion (no related file):

Should the iiwa_description directory be made its own package? (Or, is it already a package somewhere that we can use?)

We should use Drake's version, and not re-vendor it here.

And I believe our version does not use /robot_description, so we need not expose it (yet) on the package path.


a discussion (no related file):

Should we add a C++ version of the sample as well?

Nah, I think Python is sufficient!


a discussion (no related file):

Is "the robots all fall down due to gravity" a sufficient example, or should the robots do something?

I think it's fine as long as it's clearly indicated somewhere (README) that this is the expected behavior, e.g.

This will simulate the array of IIWA robots without control. The expected behavior is for
them to "flop" about as simulation time progresses.

@gbiggs
Copy link
Collaborator Author

gbiggs commented Mar 16, 2022

@IanTheEngineer Do you have a suggestion on how to find the location of the iiwa_description included with Drake? The virtual environment directory could be anywhere.

My first thought is to configure a Python file using CMake so that it contains the path as found by CMake's find_package(drake), but the downside of that is that it is fixed. If the location of the virtual environment containing drake changes, then it will break.

@EricCousineau-TRI
Copy link
Collaborator

Depends on #39

@gbiggs gbiggs force-pushed the aaron/drake_ros_examples branch 2 times, most recently from 4cae022 to 1fb51f4 Compare May 9, 2022 00:57
@gbiggs gbiggs force-pushed the gbiggs/multirobot_example branch from 875f962 to 3d3247e Compare May 22, 2022 08:38
@gbiggs gbiggs changed the base branch from aaron/drake_ros_examples to develop May 22, 2022 08:39
@EricCousineau-TRI
Copy link
Collaborator

From Anzu:

PackageMap MakeDefaultAnzuPackageMap() {
  PackageMap package_map;

  // Add ability to read `package://anzu` URIs.
  const anzu::filesystem::path packagefile_abspath =
      FindAnzuResourceOrThrow("package.xml");
  package_map.Add("anzu", packagefile_abspath.parent_path());

  // Add packages from drake.
  const anzu::filesystem::path abspath_under_drake_root =
      drake::FindResourceOrThrow("drake/.drake-find_resource-sentinel");
  package_map.PopulateFromFolder(abspath_under_drake_root.parent_path());

  return package_map;
}

@jwnimmer-tri
Copy link
Contributor

// Add packages from drake.

That stanza is no longer relevant (it used to be relevant last year). The drake::multibody::PackageMap by default has the (sole) Drake package already added. There is no need to add any additional packages from Drake.

@EricCousineau-TRI
Copy link
Collaborator

ah, kewl. will scrub that from Anzu's code then - thanks!

sloretz and others added 13 commits May 24, 2022 11:37
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Includes Drake C++ systems for tf2 broadcasting.

Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Geoffrey Biggs <[email protected]>
Signed-off-by: Geoffrey Biggs <[email protected]>
@gbiggs
Copy link
Collaborator Author

gbiggs commented May 24, 2022

Thanks for the tip, @EricCousineau-TRI . I've got it working.

However, somewhere in my rebasing I messed up, somehow, and now this PR wants to remove all of the develop branch's content. I've given up trying to clean it up and just made a new branch and PR over at #85.

@gbiggs gbiggs closed this May 24, 2022
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.

6 participants