lbr-stack / lbr_fri_ros2_stack

ROS 1/2 integration for KUKA LBR IIWA 7/14 and Med 7/14
https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_fri_ros2_stack/doc/lbr_fri_ros2_stack.html
Apache License 2.0
140 stars 41 forks source link

Humble ignition gazebo #117

Closed mhubii closed 5 days ago

mhubii commented 1 year ago

Ignition Gazebo

Ignition Gazebo (Gazebo) will be the predecessor of Gazebo (Gazebo Classic). This PR aims to already support Ignition Gazebo.

Currently, most functionality in this PR works, except for the interactive marker for MoveIt 2. For early adoption, this repo can be checked out dev-humble-ignition-gazebo. It can be run as usual.

iiwa7.webm

Tasks

mhubii commented 11 months ago

blocked by https://github.com/ros-controls/gz_ros2_control/issues/182

mhubii commented 9 months ago

interactive marker nonreactive for moveit launches

mhubii commented 3 months ago

read up on migration guide: https://gazebosim.org/docs/harmonic/migrating_gazebo_classic_ros2_packages

jclinton830 commented 2 weeks ago

I tried to run this locally, and there is a dependency problem with the fri_vendor package.

mhubii commented 2 weeks ago

hi @jclinton830 and thank you for the feedback. This PR was left a little behind, hence why it likely doesn't work.

jclinton830 commented 2 weeks ago

@mhubii Any idea on when this will be merged into the humble branch? Happy to assist with the process if it expedites it.

mhubii commented 1 week ago

hi @jclinton830 and sorry for the late response. Happy to review your PR if you decide to contribute!

Best way to do this is to start from the humble branch. These need to be implemented:

You can get inspiration:

jclinton830 commented 1 week ago

Hi @mhubii I have forked your humble version and have made my own branch called dev-humble-ign.

https://github.com/acfr/lbr_fri_ros2_stack/tree/dev-humble-ign

Do you take PRs directly into humble from forks?

mhubii commented 5 days ago

sorry for the late response @jclinton830. This branch should now work.

One remaining issue: Somehow the new Gazebo seems slow. The sdf (simulation description format), which is loaded here:

https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/833ed94a5b773035864ba28479bad179a7867278/lbr_bringup/lbr_bringup/gazebo.py#L23

and accessed from:

/usr/share/ignition/ignition-gazebo6/worlds/empty.sdf

has an integrator step size (max_step_size):

    <physics name="1ms" type="ignored">
      <max_step_size>0.001</max_step_size>

If you set this from 0.001 -> 0.01, then the simulation is quicker.

One might need to add an sdf file to this repo and extend the environment variable GZ_SIM_RESOURCE_PATH.

You can target PRs against this branch (dev-humble-ignition-gazebo)

jclinton830 commented 5 days ago

sorry for the late response @jclinton830. This branch should now work.

One remaining issue: Somehow the new Gazebo seems slow. The sdf (simulation description format), which is loaded here:

https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/833ed94a5b773035864ba28479bad179a7867278/lbr_bringup/lbr_bringup/gazebo.py#L23

and accessed from:

/usr/share/ignition/ignition-gazebo6/worlds/empty.sdf

has an integrator step size (max_step_size):

    <physics name="1ms" type="ignored">
      <max_step_size>0.001</max_step_size>

If you set this from 0.001 -> 0.01, then the simulation is quicker.

One might need to add an sdf file to this repo and extend the environment variable GZ_SIM_RESOURCE_PATH.

You can target PRs against this branch (dev-humble-ignition-gazebo)

What is the average real-time factor you are witnessing? In the above branch that I made in my forked version gazebo is working fast, with an average real-time factor of 90%.

Also, have you fixed the problem of not being able to move the robot using the interactive marker?

mhubii commented 5 days ago

What is the average real-time factor you are witnessing? In the above branch that I made in my forked version gazebo is working fast, with an average real-time factor of 90%.

With integrator step size 0.001 ~ 20% and with 0.01 about ~ 100%.

Also, have you fixed the problem of not being able to move the robot using the interactive marker?

Yes that's working now. You can e.g. try:

ros2 launch lbr_bringup gazebo.launch.py \
    model:=med7

and

ros2 launch lbr_bringup move_group.launch.py \
    rviz:=true \
    mode:=gazebo \
    model:=med7

If you could add a way to load a custom .sdf file, that would be great! Feel free to target a PR against dev-humble-ignition-gazebo. I can merge and modify as needed.

Note you can do this even after this PR gets merged.