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

[WIP] Update the robot state helper for ROS2 #6

Closed
wants to merge 41 commits into from

Conversation

livanov93
Copy link
Contributor

@livanov93 livanov93 commented Nov 12, 2020

Implementing convinient class for easy communication with robot for ROS2.

AndyZe and others added 30 commits October 30, 2020 08:21
- ur5_moveit_config
- ur_bringup
- ur_description
Update package.xml, update ur_description launching
- No `roslaunch` and `rostest` rosdep keys in ROS2
- Remove `catkin` `exec_depend`
- Renamed `rviz` rosdep key to `rviz2`
- Reenable package `colcon build`
- Add `moveit_ci` Travis config for Foxy
- Add `.ci.rosinstall` sources not yet released into Foxy
Fix below errors.  Clean out unused `.cmake` files.  Replace
`FindGtestPackage.cmake` with `ament_add_gtest()`.

    Universal_Robots_Client_Library/CMakeLists.txt:16: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/CMakeLists.txt:74: Extra spaces between 'if' and its () [whitespace/extra]

    Universal_Robots_Client_Library/CMakeModules/DefineCXX11CompilerFlag.cmake:4: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX11CompilerFlag.cmake:13: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX11CompilerFlag.cmake:33: Extra spaces between 'macro' and its () [whitespace/extra]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX11CompilerFlag.cmake:41: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX11CompilerFlag.cmake:46: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX11CompilerFlag.cmake:48: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX11CompilerFlag.cmake:50: Tab found; please use spaces [whitespace/tabs]

    Universal_Robots_Client_Library/CMakeModules/DefineCXX14CompilerFlag.cmake:4: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX14CompilerFlag.cmake:13: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX14CompilerFlag.cmake:33: Extra spaces between 'macro' and its () [whitespace/extra]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX14CompilerFlag.cmake:41: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX14CompilerFlag.cmake:46: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX14CompilerFlag.cmake:48: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX14CompilerFlag.cmake:50: Tab found; please use spaces [whitespace/tabs]

    Universal_Robots_Client_Library/CMakeModules/DefineCXX17CompilerFlag.cmake:4: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX17CompilerFlag.cmake:13: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX17CompilerFlag.cmake:33: Extra spaces between 'macro' and its () [whitespace/extra]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX17CompilerFlag.cmake:41: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX17CompilerFlag.cmake:46: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX17CompilerFlag.cmake:48: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/DefineCXX17CompilerFlag.cmake:50: Tab found; please use spaces [whitespace/tabs]

    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:0: Find modules should use uppercase names; consider using FindGTESTPACKAGE.cmake [convention/filename]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:4: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:14: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:15: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:23: Lines should be <= 80 characters long [linelength]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:34: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:37: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:39: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:41: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:43: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:44: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:49: Line ends in whitespace [whitespace/eol]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:62: Mismatching spaces inside () after command [whitespace/mismatch]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:74: Line ends in whitespace [whitespace/eol]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:82: Line ends in whitespace [whitespace/eol]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:90: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:100: Line ends in whitespace [whitespace/eol]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:110: Line ends in whitespace [whitespace/eol]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:121: Tab found; please use spaces [whitespace/tabs]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:128: Expression repeated inside endfunction; better to use only endfunction() [readability/logic]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:0: Package should include FindPackageHandleStandardArgs [package/consistency]
    Universal_Robots_Client_Library/CMakeModules/FindGTestPackage.cmake:0: Package should use FIND_PACKAGE_HANDLE_STANDARD_ARGS [package/consistency]

    Universal_Robots_Client_Library/examples/CMakeLists.txt:10: Do not mix upper and lower case commands [readability/mixedcase]

    Universal_Robots_Client_Library/tests/CMakeLists.txt:20: Extra spaces between 'if' and its () [whitespace/extra]
    Universal_Robots_Client_Library/tests/CMakeLists.txt:26: Do not mix upper and lower case commands [readability/mixedcase]
    Universal_Robots_Client_Library/tests/CMakeLists.txt:30: Extra spaces between 'if' and its () [whitespace/extra]

    deprecated_ros1_pkgs/ur_calibration/CMakeLists.txt:61: Extra spaces between 'if' and its () [whitespace/extra]
Compiler errors in unrelated `geometric_shapes` build

    Starting >>> geometric_shapes
    --- stderr: geometric_shapes
    In file included from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/libqhull_r.h:1057:9: error: redundant redeclaration of ‘void qh_printsummary(qhT*, FILE*)’ in same scope [-Werror=redundant-decls]
     1057 | void    qh_printsummary(qhT *qh, FILE *fp);
          |         ^~~~~~~~~~~~~~~
    /usr/include/libqhull_r/libqhull_r.h:1024:9: note: previous declaration of ‘void qh_printsummary(qhT*, FILE*)’
     1024 | void    qh_printsummary(qhT *qh, FILE *fp);
          |         ^~~~~~~~~~~~~~~
    /usr/include/libqhull_r/libqhull_r.h:1099:6: error: redundant redeclaration of ‘void qh_meminit(qhT*, FILE*)’ in same scope [-Werror=redundant-decls]
     1099 | void qh_meminit(qhT *qh, FILE *ferr);
          |      ^~~~~~~~~~
    In file included from /usr/include/libqhull_r/libqhull_r.h:31,
                     from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/mem_r.h:218:6: note: previous declaration of ‘void qh_meminit(qhT*, FILE*)’
      218 | void qh_meminit(qhT *qh, FILE *ferr);
          |      ^~~~~~~~~~
    In file included from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/libqhull_r.h:1100:6: error: redundant redeclaration of ‘void qh_memfreeshort(qhT*, int*, int*)’ in same scope [-Werror=redundant-decls]
     1100 | void qh_memfreeshort(qhT *qh, int *curlong, int *totlong);
          |      ^~~~~~~~~~~~~~~
    In file included from /usr/include/libqhull_r/libqhull_r.h:31,
                     from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/mem_r.h:217:6: note: previous declaration of ‘void qh_memfreeshort(qhT*, int*, int*)’
      217 | void qh_memfreeshort(qhT *qh, int *curlong, int *totlong);
          |      ^~~~~~~~~~~~~~~
    In file included from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/libqhull_r.h:1123:9: error: redundant redeclaration of ‘void qh_collectstatistics(qhT*)’ in same scope [-Werror=redundant-decls]
     1123 | void    qh_collectstatistics(qhT *qh);
          |         ^~~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/libqhull_r/libqhull_r.h:121,
                     from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/stat_r.h:515:9: note: previous declaration of ‘void qh_collectstatistics(qhT*)’
      515 | void    qh_collectstatistics(qhT *qh);
          |         ^~~~~~~~~~~~~~~~~~~~
    In file included from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/libqhull_r.h:1124:9: error: redundant redeclaration of ‘void qh_printallstatistics(qhT*, FILE*, const char*)’ in same scope [-Werror=redundant-decls]
     1124 | void    qh_printallstatistics(qhT *qh, FILE *fp, const char *string);
          |         ^~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/libqhull_r/libqhull_r.h:121,
                     from /opt/ws_moveit/src/upstream/geometric_shapes/src/bodies.cpp:44:
    /usr/include/libqhull_r/stat_r.h:519:9: note: previous declaration of ‘void qh_printallstatistics(qhT*, FILE*, const char*)’
      519 | void    qh_printallstatistics(qhT *qh, FILE *fp, const char *string);
          |         ^~~~~~~~~~~~~~~~~~~~~
    cc1plus: all warnings being treated as errors
    make[2]: *** [CMakeFiles/geometric_shapes.dir/build.make:76: CMakeFiles/geometric_shapes.dir/src/bodies.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/geometric_shapes.dir/all] Error 2
    make: *** [Makefile:141: all] Error 2
    ---
    Failed   <<< geometric_shapes [29.4s, exited with code 2]
Better enable `ament_xmllint` to check validity.
Set emacs `cmake-mode` variables to match `ament_lint_cmake` settings
Building against `moveit2` causes warnings, disallowed in CI.

@AndyZe wrote,

> Yeah, I think CI won't pass because MoveIt2 is fixed on older
> commits of ros2_control. Check out
> https://github.com/ros-planning/moveit2/blob/a810037e697c25e8df74a049fed6cca55ff8e874/moveit2.repos#L23
This reverts commit cc17021.

    rosdep install -y -q -n --from-paths . --ignore-src --rosdistro foxy
    ERROR: the following packages/stacks could not have their rosdep keys resolved
    to system dependencies:
    ur5_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
    The command "rosdep install -y -q -n --from-paths . --ignore-src --rosdistro foxy" failed [trial 1 of 3].
    [...]
    The command "rosdep install -y -q -n --from-paths . --ignore-src --rosdistro foxy" failed with error code 1.
AndyZe and others added 6 commits November 7, 2020 22:25
* Updating ur_robot_driver include guards and namespaces

* Compile the ros_control plugin, inherit from components::SystemInterface

* Do away with intermediate SystemInterface class

* Implement configure()

* Add controller_manager launch file

* Cleanup and clang format
@livanov93 livanov93 changed the title Add robot_state_helper into build process. Prepare for additionl refa… Update the robot sate helper for ROS2 Nov 12, 2020
@livanov93 livanov93 changed the title Update the robot sate helper for ROS2 [WIP] Update the robot sate helper for ROS2 Nov 12, 2020
@AndyZe AndyZe changed the title [WIP] Update the robot sate helper for ROS2 [WIP] Update the robot state helper for ROS2 Nov 16, 2020
Copy link
Contributor

@destogl destogl left a comment

Choose a reason for hiding this comment

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

This looks fine, but I am not sure how it should work in ros2_control.... @livanov93 can you comment?

default:
RCLCPP_WARN_STREAM(logger, "The robot is currently in mode " << robotModeString(robot_mode_)
<< ". This won't be handled by this helper. "
"Please "
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a strange layout....

Comment on lines 253 to 254
"non-success: " +
result.get()->message;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"non-success: " +
result.get()->message;
"non-success: " + result.get()->message;

@destogl
Copy link
Contributor

destogl commented Apr 8, 2021

@livanov93 Is this sill used?

@livanov93
Copy link
Contributor Author

In general, in the ROS1 version, this was a convenient node for interacting with the robot via services and simple SimpleActionClient/Server that are registered in the "main" driver node. However, the biggest problem was that there was no SimpleActionClient/Server abstraction in the ROS2 at the start of this PR. This was the reason the PR development was postponed. It can be done with the existing ROS2 actionlib but the logic within the node will get more complex than it was before.

@fmauch
Copy link
Collaborator

fmauch commented Jun 17, 2024

Closing this in favor of #933

@fmauch fmauch closed this Jun 17, 2024
@fmauch fmauch deleted the livanov/update_robot_state_helper branch June 17, 2024 09:52
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.

4 participants