Code Monkey home page Code Monkey logo

motion_capture_system's People

Contributors

andre-nguyen avatar frankjjiang avatar jmirabel avatar jsvacha avatar kartikmohta avatar ke-sun avatar mwatterson avatar rbinsonb avatar tbolin avatar tik0 avatar ulvs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

motion_capture_system's Issues

6DOF Body name sanitazion

ROS only supports names consisting of A-Z, a-z, 0-9, _ and /. QTM will however accept names containing other characters, which causes the qualisys_mocap ROS node to crash.
Should the names be sanitized with a warning instead?

Update readme with new settings

several new settings were added when the QTM API was updated. The readme should be updated to describe the new settings, and any other changes.

Fix time stamp issues.

start_time_local_ = ros::Time::now().toSec();

The current calculation for the time stampa of a received 6DOF pose does not account for any delay in the link between the QTM server and receiver. Neither does it recognize that the delay can vary.
Suggestion 1: Update _start_time_local if a received time would cause the time stamp to lie in the future.
Suggestion 2: Add a token delay (around 1 ms) to the timestamp, to compensate for the delay.
Suggestion 3: Remove the weird smoothing found here:
frame_interval = 0.6*frame_interval + 0.4*(packet_time - last_packet_time)/1e6;

Possible culprit for CPU leak

The CPU usage of the node keeps increasing. After a few minutes the processing will be too slow to keep up with the data stream, causing increasing delays.

subject_threads.emplace_back(&QualisysDriver::handleSubject, this, i);

The CPU leak might be caused by threads being added to subject_threads without being removed. The current pattern is inefficient even without this bug. It repeatedly creates and destroys threads. The list of threads should be replaced with a thread pool from <boost/asio/thread_pool.hpp>.

Pragmas intended to suppress compilation warnings causes compilation warnin spam

There are several pragmas in the Vicon SDK that generates error during the compilation. These pragma macros appears to be intended to suppress compilation warnings.
Example:

/src/svea_research/src/motion_capture_system/mocap_vicon/src/vicon_sdk/Vicon/CrossMarket/StreamCommon/Buffer.h:41:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning( disable : 4355 )

Help Building

Hello. Appologies if this is the wrong place to post this. I am trying to build the mocap_qualisys package.

I have setup ROS as described here: http://wiki.ros.org/Installation/Windows
I created a catkin workspace as described here: http://wiki.ros.org/catkin/Tutorials/create_a_workspace
I have cloned the git repository here into my workspace and added the workspace path to ROS_PACKAGE_PATH.
When I run catkin_make --pkg mocap_qualisys --cmake-args -DCMAKE_BUILD_TYPE=Release, I get the following output:

Base path: C:\opt\motion_capture_system
Source space: C:\opt\motion_capture_system\src
Build space: C:\opt\motion_capture_system\build
Devel space: C:\opt\motion_capture_system\devel
Install space: C:\opt\motion_capture_system\install
Packages "mocap_qualisys" not found in the workspace

It seems like the ROS_PACKAGE_PATH is not being recognized.

I have tried moving the mocap_qualisys and mocap_base folders into my workspace's src folder. In this case, I get the following output when running catkin_make --pkg mocap_qualisys --cmake-args -DCMAKE_BUILD_TYPE=Release

Base path: C:\opt\motion_capture_system
Source space: C:\opt\motion_capture_system\src
Build space: C:\opt\motion_capture_system\build
Devel space: C:\opt\motion_capture_system\devel
Install space: C:\opt\motion_capture_system\install
####
#### Running command: "cmake C:\opt\motion_capture_system\src -DCMAKE_BUILD_TYPE=Release -DCATKIN_DEVEL_PREFIX=C:\opt\motion_capture_system\devel -DCMAKE_INSTALL_PREFIX=C:\opt\motion_capture_system\install -G Ninja" in "C:\opt\motion_capture_system\build"
####
-- The C compiler identification is MSVC 19.29.30137.0
-- The CXX compiler identification is MSVC 19.29.30137.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: C:/opt/motion_capture_system/devel
-- Using CMAKE_PREFIX_PATH: C:\opt\ros\noetic\x64\tools\vcpkg\installed\x64-windows;C:\opt\ros\noetic\x64
-- This workspace overlays: C:/opt/ros/noetic/x64
-- Found PythonInterp: C:/opt/ros/noetic/x64/python.exe (found suitable version "3.8.3", minimum required is "3")
-- Using PYTHON_EXECUTABLE: C:/opt/ros/noetic/x64/python.exe
-- Using default Python package layout
-- Found PY_em: C:\opt\ros\noetic\x64\lib\site-packages\em.py
-- Using empy: C:/opt/ros/noetic/x64/lib/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: C:/opt/motion_capture_system/build/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: C:/opt/ros/noetic/x64/Scripts/nosetests.exe
-- catkin 0.8.9
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 2 packages in topological order:
-- ~~ - mocap_base
-- ~~ - mocap_qualisys
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'mocap_base'
-- ==> add_subdirectory(mocap_base)
-- Found Boost: C:/opt/ros/noetic/x64/include (found version "1.73.0")
-- +++ processing catkin package: 'mocap_qualisys'
-- ==> add_subdirectory(mocap_qualisys)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Configuring done
-- Generating done
-- Build files have been written to: C:/opt/motion_capture_system/build
####
#### Running command: "ninja -j20 -l20" in "C:\opt\motion_capture_system\build\mocap_qualisys"
####
ninja: error: loading 'build.ninja': The system cannot find the file specified.Invoking "ninja -j20 -l20" failed.

In this case, it seems as though the ninja build files for the packages are not being generated. Any help would be appreciated. Thank you.

Position hold issue

I am using the mocap qualisys node to stream data from qualisys computer to raspi (ubuntu 20.04) connected to pixhawk via uart. The connections are verified .The data is remapped to /mavros/vision_pose/pose and same data is shown on /mavros/local_position/pose. but in the mavlink inspector the LOCAL_POSITION_NED , the x and y values are flipped. The altitude hold mode is working but the position hold is not working.
My doubt is whether the qualisys node is converting the data in to ENU frame or is it streaming the same frame as the corrdinate system in the mocap software and if somebody have solved the issue ,please help.

Fix StreamFrames

bool CRTProtocol::StreamFrames(EStreamRate eRate, unsigned int nRateArg, unsigned short nUDPPort, const char* pUDPAddr,

Current version of this method can only request 6DOF body streams. The previous version was straight up broken. Both could theoretically cause a segfault due to use of snprintf on a small buffer (that is still large enough that stack overflows could be a worry).
The method should be rewritten with C++ strings and able to send any valid request.

Get ridd of unnecesary lock in HandleSubject

boost::unique_lock<boost::shared_mutex> write_lock(mtx);

Several read only operations are currently within a lock. If these operations actually changes anything in the prt_packet a lock will not help. The lock for tf_publisher.sendTransform(stamped_transform); should also be unnecessary since tf broadcasters are supposed to be thread safe (the package is also still using tf and not tf2, but that is another issue).

Missing check for frame stream initialization

bDataAvailable = port_protocol.StreamFrames(

When the data stream is requested a boolean is returned to indicate if the stream is successfully started or not.
The value of the bool is never checked, so if the request to start a stream fails, the node will still go ahead and report that the initialization was successful.
I'm not aware what could cause this situation to occur or if it is even possible.
Several (properly checked) interactions with the server have to succeed before the stream is requested, but the check should still be there.

Divide `udp_port` parameter into `transport_protocol` and `stream_port`

Suggestion: Divide the udp_port argument into two arguments. The transport protocol would be set by transport_protocol,
a string that should be either UDP or TCP, and the port should be set by stream_port, an integer.

Motivation: Currently, the udp_port parameter decides both if TCP or UDP is used, and which port that is used. The port is however only selectable for UDP. If TCP is used, the port is always random. Specifying which TCP port that should be used could be useful.
The current parameter name is also misleading.

Odometry twist not respecting frame convention

The qualysis mocap node delivers an odometry message and the twist part of the message (velocities) does not follow the convention.

Odometry message definition (https://docs.ros.org/melodic/api/nav_msgs/html/msg/Odometry.html) states:

The twist in this message should be specified in the coordinate frame given by the child_frame_id

The "child_frame_id" is correctly set to <tracked_object/base_frame> but the velocities are expressed in the mocap world frame and not the object local frame.

Get marker position

Hi,

I would like to get (labelled) marker position from QTM to ROS, in order to be able to use AIM.
Your implementation of the protocol seems quite complete, so I will probably try to write PR to do what I want.

Any suggestions/recommendations before I start ?
What do you think of that ?

Best,
Etienne.

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.