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

Ros2 #20

Open
wants to merge 8 commits into
base: foxy-devel
Choose a base branch
from
Open

Ros2 #20

wants to merge 8 commits into from

Conversation

AlexKaravaev
Copy link

Hi!

This is latest ros2 sync. I have tested it with ros2 rolling distribution and Optitrack setup with Motive with 2 distinct rigid bodies. Mostly it based on @zeroos PR #16 , but I've added also twist and accel publishing and also some changes described below.

Notable logical changes I made:

  1. I added explicit calculation of twist and accel based on previous messages

  2. Removed multiple sensor support. To be honest, I just don't know how it works and what are sensor id's and therefore I deleted it. If you can provide me some info about that, I can commit changes later.

Also, I think it should not be merged into foxy-devel branch, but instead we should create separate branch ros2 to track latest rolling version updates. But since I don't have the rights to create new branch I submitted PR to existing branch

@AlexKaravaev AlexKaravaev marked this pull request as draft November 3, 2021 10:18
@AlexKaravaev AlexKaravaev marked this pull request as ready for review November 3, 2021 10:18
@paulbovbel
Copy link
Member

This is great, thanks. I'll circle back around to review this as soon as I can. Merging into foxy is fine, we can re-arrange branches once this is released anyways.

@@ -222,143 +223,206 @@ namespace vrpn_client_ros

tf_broadcaster.sendTransform(tracker->transform_stamped_);
}


if (tracker->calculate_twist_and_accel_ && tracker->previous_message_arrived_)
Copy link
Member

Choose a reason for hiding this comment

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

This is an interesting feature! Honestly I think it probably belongs as another node in the system, consuming 'pose' messages and spitting out 'twist' and/or 'accel'. that keeps the VRPN client 'simpler' in that it's responsible only for adapting the incoming data.

Copy link
Author

Choose a reason for hiding this comment

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

Agree completely. I will remove that func from this package and some more commits to PR

Copy link
Author

Choose a reason for hiding this comment

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

Removed in a9db176

@paulbovbel
Copy link
Member

Removed multiple sensor support. To be honest, I just don't know how it works and what are sensor id's and therefore I deleted it. If you can provide me some info about that, I can commit changes later.

I wish I could remember, but I imagine they existed for a reason. I haven't had access to a VICON system in years.

@evbernardes
Copy link

How can I install the VRPN dependency? I'm having this when I try to build with colcon:

Could NOT find VRPN (missing: VRPN_LIBRARY VRPN_INCLUDE_DIR QUATLIB_FOUND)

@AlexKaravaev
Copy link
Author

@evbernardes You should install it from here https://github.com/vrpn/vrpn

@evbernardes
Copy link

@AlexKaravaev thanks for the reply! Is there a special way I have to install in order for colcon to be able to use the library to correctly compile using it?

@AlexKaravaev
Copy link
Author

@evbernardes For me it was working with usual make && sudo make install

@evbernardes
Copy link

@AlexKaravaev I was definitely overthinking it, thanks!
I managed to compile it, but I'll have to wait until my lab is open so I can test it with our mocap system.

Just a little thing though: I installed tf2 with apt get and I had too change two lines from vrpn_client_ros.cpp:

#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" -> #include "tf2_geometry_msgs/tf2_geometry_msgs.h
#include "tf2_kdl/tf2_kdl.hpp -> #include "tf2_kdl/tf2_kdl.h

And then it compiled!

@AlexKaravaev
Copy link
Author

@evbernardes Which ros-version and ubuntu you are using? Because in rolling it seems like with latest tf2 it explicitly says, that .h are deprecated

/overlay_ws/install/tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.h:35:2: warning: #warning This header is obsolete, please include tf2_geometry_msgs/tf2_geometry_msgs.hpp instead [-Wcpp]
   35 | #warning This header is obsolete, please include tf2_geometry_msgs/tf2_geometry_msgs.hpp instead
      |  ^~~~~~~
In file included from /overlay_ws/src/vrpn_client_ros/src/vrpn_client_ros.cpp:40:
/overlay_ws/install/tf2_kdl/include/tf2_kdl/tf2_kdl.h:35:2: warning: #warning is a GCC extension
   35 | #warning This header is obsolete, please include tf2_kdl/tf2_kdl.hpp instead
      |  ^~~~~~~


@evbernardes
Copy link

I see! I'm using galactic with Ubuntu 20.04, which is supposed to be the latest LTS release. I tried to install everything I can with apt to minimize these kinds of problems but I'm starting to think it wasn't the best option

toshi67026 added a commit to toshi67026/vrpn_client_ros that referenced this pull request Jun 1, 2022
@toshi67026 toshi67026 mentioned this pull request Apr 20, 2023
Closed
@Crowdedlight
Copy link

Any updates on this one? I can see there is ros-foxy-vrpn-client-ros available, but none for Humble, the current LTS release.
Is this PR meant to also work for humble?

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