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

lbr_bring_up doesn't publish /lbr/state? #106

Closed CarlDegio closed 9 months ago

CarlDegio commented 1 year ago

In the past, the launch file bringup.launch.py will publish /lbr/command and /lbr/state topics. But now I found it doesn't. Is this normal?

And now the cpp demo doesn't need to launch bringup.launch.py cause the app_node is used(Inconsistent with README).

CarlDegio commented 1 year ago

And I would like to know when use demo(such as advance c++) how to publish robot model in rviz like bringup.launch.py? I add some launch option but there are no TF and robot model in rviz. It seems that currently app_node does not publish TF and robot models

mhubii commented 1 year ago

sorry for the confusion.

The core is always the App https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/humble/lbr_fri_ros2/include/lbr_fri_ros2/app.hpp. It reads commands from /robot-name/command and sends states to /robot-name/state.

The bringup launches the hardware interface and sets the robot-name to _robot-name, hence topics still exist, but are hidden, try ros2 topic list --include-hidden. This is to prevent users from publishing to /robot-name/command, since the hardware interface does. Hope that makes sense. It might be better to only hide the command topic?

To visualize the robot in rviz, you could take data from the /robot-name/state topic and re-publish it as JointState.

Could you please pinpoint to the section in the readme so it can be fixed? Thank you

CarlDegio commented 1 year ago

Thank you! I got that. In addition, I would like to ask ros2 control interface is expected to use with lbr_bringup currently? Since the users interactive kuka with jointstate.

The current readme does not mention the difference between app and lbr_bringup. Only topic difference in demo: https://lbr-fri-ros2-stack-doc.readthedocs.io/en/humble/lbr_fri_ros2_stack/lbr_demos/doc/lbr_demos.html and https://lbr-fri-ros2-stack-doc.readthedocs.io/en/humble/lbr_fri_ros2_stack/lbr_demos/lbr_demos_ros2_control_cpp/doc/lbr_demos_ros2_control_cpp.html

mhubii commented 1 year ago

sorry not sure I got the question, correctly.

Most ROS users are familiar with the hardware interface (ROS 2 control), which is launched in the lbr_bringup package. ROS 2 control, however, can be a little overwhelming at first.

For research and to get started quickly, one can also launch lbr_fri_ros2 standalone.

There is some documentation on the bringup here https://lbr-fri-ros2-stack-doc.readthedocs.io/en/humble/lbr_fri_ros2_stack/lbr_bringup/doc/lbr_bringup.html

It should probably clarified in the links you sent.

CarlDegio commented 1 year ago

Oh, i just noticed it. In fact, I think this is caused by the experience of using this library before XD. Maybe it will be easier for a new user to understand.

mhubii commented 1 year ago

You raised a couple of valid points and we will try to address them, so thank you very much @CarlDegio !

mhubii commented 11 months ago

this will be added in #130

mhubii commented 9 months ago

this issue is now fully resolved.

System can for example be launched via

ros2 launch lbr_bringup bringup.launch.py model:=iiwa7 sim:=false ctrl:=forward_lbr_position_command_controller

This will spawn:

This will also spawn RViZ.

Available controllers can be listed via: ros2 launch lbr_bringup bringup.launch.py -s. More documentation is on the way.