Git Product home page Git Product logo

vrpn_client_ros's People

Contributors

cjue avatar karlun avatar paulbovbel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vrpn_client_ros's Issues

VRPN Tracker May Have Multiple Sensors

A VRPN "tracker" can have multiple tracked frames, each being a separate "sensor" in the VRPN API. In our project we have two sensors on one tracker and need to be able to read these off separately. The attached patch adds a parameter "append_sensor_id" that when set to true makes the client append the sensor id to the tracker name before submitting the pose to the tf topic.

sensor_id.patch.txt

foxy

parallels@ubuntu-linux-20-04-desktop:~/catkin_ws$ colcon build
Starting >>> vrpn_client_ros
--- stderr: vrpn_client_ros
CMake Error at CMakeLists.txt:4 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "catkin", but
  CMake did not find one.

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

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
  "catkin_DIR" to a directory containing one of the above files.  If "catkin"
  provides a separate development package or SDK, be sure it has been
  installed.


---
Failed   <<< vrpn_client_ros [0.06s, exited with code 1]

Summary: 0 packages finished [0.17s]
  1 package failed: vrpn_client_ros
  1 package had stderr output: vrpn_client_ros
parallels@ubuntu-linux-20-04-desktop:~/catkin_ws$ 

Query

On ROS wiki, you package describes that /twist and /accel are available in Vicon Tracker 3.3+. Does it mean I cannot subscribe those messages with motive?

Thx

Missing dependency

I'm writing an issue here, since this is the repository listed on http://wiki.ros.org/vrpn_client_ros. https://github.com/usrl-uofsc/vrpn_client_ros should suffer from this as well.

When using Docker ROS core image for Noetic, there is a missing system dependency of netbase. VRPN client ROS package will install and run, but then complains about connection VRPN connection is not 'doing okay', which does not explain the exact issue.

Steps to replicate the issue:

sudo docker run --network=host --rm -it ros:noetic-ros-core
# Inside container
apt update
apt install ros-noetic-vrpn-client-ros
source /opt/ros/noetic/setup.bash
# Run VRPN server with empty configuration
touch vrpn.cfg
vrpn_server &
# Launch ROS VRPN client
roslaunch vrpn_client_ros sample.launch

To solve this, install the netbase package [inside the container]:

# apt install netbase

Then rerunning the sample.launch will establish a connection and list the example tracker. This behaviour was confirmed on a motion capture system providing VPRN data.

I guess this VRPN implementation relies on some of the definitions from the package in /etc: /etc/ethertypes, /etc/protocols, /etc/rpc, /etc/services.

This does not appear to be easily fixable by adding <exec_depend>netbase</exec_depend> to package.xml, since there is no key definition for netbase.

netbase ought to be present on most systems, so this might have gone undetected because of that. Bare bones containers are a nice way of verifying dependencies.

Scale error in twist angular velocities

Have observed angular velocities published by twist pub are too small by a factor of 100 in my case. This is while running the tracker at 100hz. I believe this driver is missing a division by dt.

Looking in VrpnTrackerRos::handle_twist, I see the vrpn_TRACKERVELCB vel_quat field is currently converted from quaternion to Euler then published without further modification.

Note in the the definition of the vrpn_TRACKERVELCB struct:

typedef struct _vrpn_TRACKERVELCB {
    struct timeval msg_time;  // Time of the report
    vrpn_int32 sensor;        // Which sensor is reporting
    vrpn_float64 vel[3];      // Velocity of the sensor
    vrpn_float64 vel_quat[4]; // Rotation of the sensor per vel_quat_dt
    vrpn_float64 vel_quat_dt; // delta time (in secs) for vel_quat
} vrpn_TRACKERVELCB;

The vel_quat field provides change in rotation over a time interval, and the vel_quat_dt provides the length of that time interval. Hence the user must divide vel_quat by vel_quat_dt to determine rotation rate per second. This driver does not perform that division, hence the scaling error on published angular velocity.

I'd suggest the following (untested!) change is appropriate:

diff --git a/src/vrpn_client_ros.cpp b/src/vrpn_client_ros.cpp
index 7a03870..899ee45 100644
--- a/src/vrpn_client_ros.cpp
+++ b/src/vrpn_client_ros.cpp
@@ -265,15 +265,15 @@ namespace vrpn_client_ros
       tracker->twist_msg_.twist.linear.y = tracker_twist.vel[1];
       tracker->twist_msg_.twist.linear.z = tracker_twist.vel[2];
 
-      double roll, pitch, yaw;
+      double d_roll, d_pitch, d_yaw;
       tf2::Matrix3x3 rot_mat(
           tf2::Quaternion(tracker_twist.vel_quat[0], tracker_twist.vel_quat[1], tracker_twist.vel_quat[2],
                           tracker_twist.vel_quat[3]));
-      rot_mat.getRPY(roll, pitch, yaw);
+      rot_mat.getRPY(d_roll, d_pitch, d_yaw);
 
-      tracker->twist_msg_.twist.angular.x = roll;
-      tracker->twist_msg_.twist.angular.y = pitch;
-      tracker->twist_msg_.twist.angular.z = yaw;
+      tracker->twist_msg_.twist.angular.x = d_roll / tracker_twist.vel_quat_dt;
+      tracker->twist_msg_.twist.angular.y = d_pitch / tracker_twist.vel_quat_dt;
+      tracker->twist_msg_.twist.angular.z = d_yaw / tracker_twist.vel_quat_dt;
 
       twist_pub->publish(tracker->twist_msg_);
     }

Porting to ROS2?

Hi! Has anyone tried vprn_client_ros with ROS2, specifically Dashing Diademata? Are there any plans to port it over?

melodic package

Thank you for your open source work on vrpn_client_ros. I would like to ask if there is a link to melodic version for reference, or how to learn to write a melodic version package as a beginner of vrpn.

Noetic package

Hello
Thanks for this nice package first. Do you have any plan to update it to ros-noetic? Thanks.

No node publishing postion data

I want to send the data of posision of the cameras optitrack (windows pc) to ros (ubuntu pc). I was reading many forums and decided to choose the method vrpn_client_ros.

In Motive I have the vrpn broadcast option with ip (239.255.42.99) and a port: 3883. I made a LAN with a router where the windows pc has an ip (192.168.1.2) and the Ubuntu pc has an ip (192.168.1.1).

When I run the launch file (roslaunch vrpn_client_ros sample.launch server: = "239.255.42.99") on a terminal, I get the answers: "Connecting to VRPN server at 239.255.42.99" and "Connection established".

My problem is that the topics published do not appear, and therefore I can not get the position data in ros.

How can I solve this problem?

Do I have to modify the launch file?

Reagards!!

streaming position of single marker

Hi There,

Is it possible to stream the position (no orientation) of single markers from Motive, via this package? If so what do I need to change to achieve that?

Cheers!

How the orientation of "pose" works?

I succeeded to extract the data and everything seemed fine until I found out that the yaw of orientation works little bit weird.
So far what I found out is, the value of y(yaw) is sin of theta which is divided by 2 from the origin degree. This is okay, but when I flipped the object it went crazy. I kept trying to find a rule about how flipping affects y value whenever I flipped it, but, apparently, it seems like there is no rule.
I just want to know how the orientation works, especially for y(yaw), and what the w is for.

Unable to locate package ros-kinetic-vrpn-client-ros

I am using Ubuntu 16.04 and ROS Kinetic. When I try to run "sudo apt-get install ros-kinetic-vrpn-client-ros", I get the error "unable to locate package". I have also tried cloning from the git-repository but when I try to do catkin_make it fails and
vrpn_error
I have also tried to run "rosdep install --from-paths" but it gives an error saying "rosdep: error: no packages or stacks specified"
How can I resolve this issue?

Problems to use vrpn_client_ros

Hello.

The reason why I am writing to you is to ask for your help, since when using the vrpn_client_ros package the topic does not appear, I am a beginner in ROS, but I think I have executed the basic steps correctly, since I have done the following:

1.-Install ros kinetic and ros-kinetic-vrpn

2.- I made the workspace.
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make

3.- clone the package
cd src/
git clone https://github.com/ros-drivers/vrpn_client_ros.git
sudo apt-get update
cd ..
catkin_make

  1. I configure the ip in ubunto as 192.168.0.102 and in windows as 192.168.0.100 and verify the communication using ping.

5.- I configure Motive 1.9
โœ” Broadcast Frame Data
Local Interface ip 192.168.0.100
Stream Rigid Bodies: True
Transmission Type: Multicast
VRPN:
โœ” Broadcast Frame Data
VRPN Broadcast port: 3883

6.- I write roslaubch vrpn_clientros sample.launch server:=192.168.0.100

I'd appreciate your help.

It couldn't work in docker

My environment is MacBook Pro M1, Docker for M1. I pulled a docker image , ros:melodic,from docker hub, and installed ros-melodic-vrpn and this code. but this code can't working. It stoped at
"
connect established
"
for comparing, I running it at Jetson Nano Native OS and Docker in the Jetson Nano which the image was same with the MacBook, ros:melodic. The result showed it can connect the Movite when it running in the Jetson Nano Native OS and can not connect in the Docker in the Jetson Nano either.

then, the other software needed using network in the two docker containers could running normally, such as ssh, apt-get, curl and so on, and running "ping" to Movite's IP in the two docker containers could success.

Release for ROS Melodic

Is this package going to be released for ROS Melodic any time soon?

I did compile and run it on Ubuntu 18.04 with ROS Melodic and it worked okay so I expect it to be easy!

vrpn conflicts with rqt_graph for ROS Melodic

Below is the command line prompt. I wanted to view the rqt_graph after running vrpn node. The vrpn node runs fine in ROS and I am able to view the rqt_graph if no data is being sent from Motive (optitrack). But, if data is being sent from motive, the rqt_graph aborts and shows the below error.

#############################
rospc@avl2:~/catkin_ws$ rqt_graph
PluginHandlerDirect._restore_settings() plugin "rqt_graph/RosGraph#0" raised an exception:
Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 116, in _restore_settings
self._plugin.restore_settings(plugin_settings_plugin, instance_settings_plugin)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 217, in restore_settings
self._refresh_rosgraph()
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 246, in _refresh_rosgraph
self._update_graph_view(self._generate_dotcode())
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 280, in _generate_dotcode
hide_dynamic_reconfigure=hide_dynamic_reconfigure)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_graph/dotcode.py", line 876, in generate_dotcode
hide_dynamic_reconfigure=hide_dynamic_reconfigure)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_graph/dotcode.py", line 700, in generate_dotgraph
nt_nodes, edges, tf_connections = self._group_tf_nodes(nt_nodes, edges, node_connections)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_graph/dotcode.py", line 513, in _group_tf_nodes
tf_topic_edges_in.update([x for x in node_connections[n].incoming if x in edges and x.end in nodes])
KeyError: ' /tf'
########################

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.