Git Product home page Git Product logo

Comments (6)

SalvoVirga avatar SalvoVirga commented on September 24, 2024

Hum, I never tried myself what you wrote sounds correct.

2 joint_states are published, which each contain all joints, so they constantly contradict eachother and the arms jump between positions all the time.

Are the two joint_states publishes in two different topics? (They should)
Also, the two robots should have different names for their joints, as the names depend on the robot_name, is that the case?

from iiwa_stack.

broesdecat avatar broesdecat commented on September 24, 2024

I committed my changes in a fork of your repo, so maybe you can immediately see from the changes what might be going wrong (very few changes): https://github.com/broesdecat/iiwa_stack

The jointnames are indeed different, and the joint_states are published in different topics, but they both contain all 14 joints.

With the changes in my fork, if you for example publish a command to /iiwa/PositionJointInterface_J2_controller, the rviz visualisation will start jumping between 2 positions, and gazebo will not do anything. If you publish to the other robot (/iiwa2/PositionJointInterface_J2_controller) nothing happens.

from iiwa_stack.

SalvoVirga avatar SalvoVirga commented on September 24, 2024

I had some time to have a look at your changes.
In general, you should try not to directly change the packages in iiwa_stack, but rather use them in your own packages for your needs. With #68 I made the origin of the robot model parametric, so that one can change were the robot is spawned.

I made very quickly an example of how to spawn two iiwas in Gazebo here.
There are mainly two launch files to look at:

  • here the Gazebo world is created and two iiwas are spawned with different origins and different name (and in a different namespace).
  • here the first launch file is called and the trajectory controllers are created for the two iiwas. Each one is created in the proper namespace, so that they look for the right robot model.

To create the right controller, this launch file is called. This is actually exactly the same as the one in iiwa_control, what changes is that in that package there are two yaml files for the two robots. Sadly, you have to create a yaml file that has the right joint names accordingly to the ones created by the Xacro with the given robot_name, but it'is just a matter of copy/paste.

There are definitely other ways to achieve the same thing, this is just a quick example but it should give you the main idea. If you need to use MoveIt!, then you should probably generate another Xacro that contains both models and make a MoveIt! package out of it, a good example is this repo from the guys in Pisa. They have a robot model with two LBR 4+, but it kinda the same.

I hope this can help, let me know if you need anything else or if the issues can be closed!

from iiwa_stack.

broesdecat avatar broesdecat commented on September 24, 2024

Hi Salvo,

I had a look at your changes and the new example, and that was indeed exactly what I needed to get it working! Screenshot of the result of adding a launch/yaml file generator on top of the whole:
iiwa party
Still have to figure out why the textures have run away though.

To get it working with moveit i'll indeed have to combine some stuff into one xacro, but that will be no problem, it was more the controllers that I did not manage to get right.

Feel free to close the issue, thx!
Broes

PS: setting_control_mode no longer compiles with me, apparently because something changed in the ConfigureSmartServo submessages?

from iiwa_stack.

broesdecat avatar broesdecat commented on September 24, 2024

Found texture issue: in iiwa_description/urdf/iiwa.gazebo.xacro, iiwa_link should be replaced ${robot_name}_link everywhere.

Broes

from iiwa_stack.

SalvoVirga avatar SalvoVirga commented on September 24, 2024

Thanks for the hint, I fixed that. I close the issue, I will link it in the wiki as a reference for other people that want to use multiple arms.

PS: setting_control_mode no longer compiles with me, apparently because something changed in the ConfigureSmartServo submessages?

It is not clear what you mean with this. Does something in iiwa_ros not compile for you? Did you try to clear the workspace? Nothing change in the message definitions since some months.

from iiwa_stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.