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

Jazzy & gz8 support #14

Open
wants to merge 7 commits into
base: jazzy-devel
Choose a base branch
from

Conversation

Juancams
Copy link
Member

Hi!

I'm adding mocap4ros2_gazebo support for the new ROS 2 Jazzy and Gz8 Harmonic versions. This PR resolves the issue #6

I have kept the same for ROS 2, and for the plugin part, it is quite similar to humble implementation, with the necessary modifications for operation in newer versions of gazebo.

Before merging, create a new branch of jazzy-devel.

Greetings

Signed-off-by: Juancams <[email protected]>
@jmguerreroh jmguerreroh changed the base branch from humble-devel to jazzy-devel November 13, 2024 17:44
@jmguerreroh
Copy link
Member

Please @aaggj, check this PR.

@aaggj
Copy link
Contributor

aaggj commented Nov 14, 2024

Hi!

Thank you for the PR.

I tried to execute following the steps, but I get this error:

[gz-4] [Err] [SystemLoader.cc:92] Failed to load system plugin [libgz_ros_mocap.so] : Could not find shared library.

It is weird because I have the library installed:

aaggj@ROS:~/ros/2ros/mocap_ws/install/gz_mocap4r2_plugin/lib/gz_ros_mocap$ ls
libgz_ros_mocap.so.

Best regards.

Signed-off-by: Juancams <[email protected]>
Signed-off-by: Juancams <[email protected]>
Signed-off-by: Juancams <[email protected]>
Signed-off-by: Juancams <[email protected]>
@Juancams
Copy link
Member Author

The error you have is because it is necessary to export the path to the library,

GZ_SIM_SYSTEM_PLUGIN_PATH=~/<path-to-ws>/install/gz_mocap4r2_plugin/lib/gz_ros_mocap/

but with these latest changes f6641b0 it is no longer necessary.

@aaggj
Copy link
Contributor

aaggj commented Nov 20, 2024

Hi!

I tried in my computer and it works, but I tried in a docker with jazzy and it throws me this error and warnings:

CMake Warning at /opt/ros/jazzy/opt/gz_cmake_vendor/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:243 (find_package):

By not providing "Findgz-plugin2.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"gz-plugin2", but CMake did not find one.

Could not find a package configuration file provided by "gz-plugin2" with
any of the following names:

gz-plugin2Config.cmake
gz-plugin2-config.cmake

Add the installation prefix of "gz-plugin2" to CMAKE_PREFIX_PATH or set
"gz-plugin2_DIR" to a directory containing one of the above files. If
"gz-plugin2" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:12 (gz_find_package)

CMake Warning at /opt/ros/jazzy/opt/gz_cmake_vendor/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:243 (find_package):
By not providing "Findgz-sim8.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "gz-sim8", but
CMake did not find one.

Could not find a package configuration file provided by "gz-sim8" with any
of the following names:

gz-sim8Config.cmake
gz-sim8-config.cmake

Add the installation prefix of "gz-sim8" to CMAKE_PREFIX_PATH or set
"gz-sim8_DIR" to a directory containing one of the above files. If
"gz-sim8" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:13 (gz_find_package)

CMake Warning at /opt/ros/jazzy/opt/gz_cmake_vendor/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:243 (find_package):
By not providing "Findgz-rendering8.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"gz-rendering8", but CMake did not find one.

Could not find a package configuration file provided by "gz-rendering8"
with any of the following names:

gz-rendering8Config.cmake
gz-rendering8-config.cmake

Add the installation prefix of "gz-rendering8" to CMAKE_PREFIX_PATH or set
"gz-rendering8_DIR" to a directory containing one of the above files. If
"gz-rendering8" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:14 (gz_find_package)

CMake Warning at /opt/ros/jazzy/opt/gz_cmake_vendor/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:243 (find_package):
By not providing "Findgz-sensors8.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"gz-sensors8", but CMake did not find one.

Could not find a package configuration file provided by "gz-sensors8" with
any of the following names:

gz-sensors8Config.cmake
gz-sensors8-config.cmake

Add the installation prefix of "gz-sensors8" to CMAKE_PREFIX_PATH or set
"gz-sensors8_DIR" to a directory containing one of the above files. If
"gz-sensors8" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:15 (gz_find_package)

CMake Error at CMakeLists.txt:35 (target_link_libraries):
Target "mocap_gz_ros" links to:

gz-plugin::gz-plugin

but the target was not found. Possible reasons include:

'* There is a typo in the target name.
'* A find_package call is missing for an IMPORTED target.
'* An ALIAS target is missing.

Best,

@Juancams
Copy link
Member Author

Please check that you are following the steps in this link correctly.

Everything compiles correctly, the CI is telling you so.

@fmrico
Copy link
Member

fmrico commented Dec 2, 2024

What is the status of this?

@aaggj
Copy link
Contributor

aaggj commented Dec 2, 2024

It is proven and it works, the only thing is that I have to publish a tf static from base_link to base_mocap in order to make robot_gt work

@Juancams
Copy link
Member Author

Juancams commented Dec 2, 2024

Hi @aaggj

Is this necessary because robot_gt subscribes to base_mocap?

Because just for the example that is uploaded, the urdf does not contain any base_mocap, so if robot_gt only subscribes to the base_mocap, both the link and the joint would have to be added.

@aaggj
Copy link
Contributor

aaggj commented Dec 2, 2024

Yes, robot_gt looks for the transform from base_mocap to base_footprint

@Juancams
Copy link
Member Author

Juancams commented Dec 2, 2024

And wouldn't it be better if robot_gt looked at the transformation between a link you specify and base_footprint? Does the urdf necessarily have to contain a link called base_mocap?

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