jhu-cisst / cisst Goto Github PK
View Code? Open in Web Editor NEWJHU ERC CISST Library
Home Page: http://github.com/jhu-cisst/cisst/wiki
License: Other
JHU ERC CISST Library
Home Page: http://github.com/jhu-cisst/cisst/wiki
License: Other
It looks like there is some misalignment of code block here: https://github.com/jhu-cisst/cisst/wiki/cisstStereoVision-tutorial-1#mac-os-x-specific-pre-requisites
E- File: mtsGenericObjectProxy.h Line: 640 - ConditionalCreate: argument prototype is wrong type for command "BatchReady" (expected "N13mtsStateTable10IndexRangeE", got "N13mtsStateTable10IndexRangeE")
Confused about why this is happening whenever I add a component to mtsManagerLocal... would someone be able to shed some light?
Make Error at cisst/cmake/cisstInternalMacros.cmake:69 (message):
cisst_set_package_settings: value for variable INCLUDE_DIRECTORIES provided
for package cisstNetlib used by library cisstNumerical is not properly
defined
Call Stack (most recent call first):
cisst/cisstNumerical/CMakeLists.txt:33 (cisst_set_package_settings)
CMake Error at cisst/cmake/cisstInternalMacros.cmake:69 (message):
cisst_set_package_settings: value for variable LIBRARIES provided for
package cisstNetlib used by library cisstNumerical is not properly defined
Call Stack (most recent call first):
cisst/cisstNumerical/CMakeLists.txt:34 (cisst_set_package_settings)
I've been working on a portfile for a cisst
package to be included in vcpkg
and while doing so discovered that even if CISST_BUILD_APPLICATIONS
is turned off, the data generator application is still built. Is this to be expected?
The building of the cisstDataGeneretor
project also initially fails when first building the cisst
solution because it can't find cisstRevision.h
when the build first starts. I'd suggest added a dependency via CMake between cisstDataGenerator
and the cisstRevision
build target so that it always completes first before trying to build cisstDataGenerator
.
The macro CMN_LOG
in cmn_Throw.h
produces the following compiler error when built with Xcode 7.0:
/usr/local/include/cisstCommon/cmnThrow.h
/usr/local/include/cisstCommon/cmnThrow.h:80:9: Incompatible operand types ('int' and 'std::__1::basic_ostream<char>')
/Users/athundt/source/robonetracker/modules/grl/src/v_repExtGrlInverseKinematics/v_repExtGrlInverseKinematics.cpp:21:10: In file included from /Users/athundt/source/robonetracker/modules/grl/src/v_repExtGrlInverseKinematics/v_repExtGrlInverseKinematics.cpp:21:
/Users/athundt/source/robonetracker/modules/grl/include/grl/cisst/VrepVFController.hpp:12:10: In file included from /Users/athundt/source/robonetracker/modules/grl/include/grl/cisst/VrepVFController.hpp:12:
/usr/local/include/sawConstraintController/mtsVFController.h:22:10: In file included from /usr/local/include/sawConstraintController/mtsVFController.h:22:
/usr/local/include/cisstNumerical/nmrConstraintOptimizer.h:22:10: In file included from /usr/local/include/cisstNumerical/nmrConstraintOptimizer.h:22:
/usr/local/include/cisstVector/vctDynamicVectorTypes.h:29:10: In file included from /usr/local/include/cisstVector/vctDynamicVectorTypes.h:29:
/usr/local/include/cisstVector/vctDynamicVector.h:30:10: In file included from /usr/local/include/cisstVector/vctDynamicVector.h:30:
/usr/local/include/cisstCommon/cmnDeSerializer.h:33:10: In file included from /usr/local/include/cisstCommon/cmnDeSerializer.h:33:
/usr/local/include/cisstCommon/cmnGenericObject.h:35:10: In file included from /usr/local/include/cisstCommon/cmnGenericObject.h:35:
/usr/local/include/cisstCommon/cmnLogger.h:170:68: Expanded from macro 'CMN_LOG'
This error seems to appear for all instances of the CMN_LOG
macro. In particular I believe it to be the 0 in this definition:
#define CMN_LOG(lod) \
(!(cmnLogger::GetMask() & cmnLogger::GetMaskFunction() & lod)) ? \
0: \
((cmnLODOutputMultiplexer(cmnLogger::GetMultiplexer(), lod).Ref()) << cmnLogLevelToString(lod) << " ")
Temporary fix was to change CISST_HAS_QT to CISST_HAS_QT4 (see 26798ae)
There is a serious need to get multiple rigid body frames that correspond to the same timestamp.
cisstNumerical contains nmrNNLSSolver.h
and nmrNNLS.h
; presumably these are non-negative least-squares solvers. But, nmrNNLS.h
appears to be unfinished -- while many of the comments are relevant to NNLS, the only LAPACK function called is dgesvd
, which computes the SVD.
We should either delete this file, update it, or at least document that it is not finished and use conditional compilation (i.e., #if 0
) to disable it.
In the master branch, cisstNumerical
has nmrHFTISolver.h
which uses the function hfti()
(in line# 183) but its not defined anywhere. I followed the instructions to get the appropriate cisstNetlib
library but couldn't find any declaration/definition for this function in that either.
This doesn't cause the cisst build to fail, but any program which tries to use the cisstNumerical library fails at the compile step as it wouldn't find the function definition. Greping the lib directory showed that the libcisstNetlib_hanson_haskell.a
and libcisstNetlib_lawson_hanson.a
had these strings (which I believe means that the function is defined in the library but is not declared in the header file)
I realized there are two ways I can fix this issue.
code/CMakeLists.txt
directory (in cisstNumerical
component)gfortran-makefiles/include/cisstNetlib/lawson-hanson.h
file, from the cisstNetlib
repo, to the automatically downloaded cisstNetlib include/cisstNetlib/
directory. Commented out the #include "fortran-types.h"
line. Included this file in include/cisstNetlib.h
file.I am not sure if these are the correct solutions to the problem, but they seem to silent the compiler from throwing the error.
I am not sure if this is the right place to report this issue. If its not, please excuse me and ignore this. If possible point me to where I should report.
Thanks.
The following code snippet produces an incorrectly colored saved image (e.g., all blue). It should swap color channel R and B.
std::string inputFile("testFile.bmp");
std::string outputFile("outFile.bmp");
svlSampleImageRGB inputImage;
svlSampleImageRGB outputImage;
int result = 0;
result = svlImageIO::Read(inputImage, 0, inputFile, false);
outputImage.SetSize(inputImage);
// the following does not work when original image is bmp on mac.
result = svlImageProcessing::SwapColorChannels(&inputImage, 0, &outputImage, 0);
result = svlImageIO::Write(outputImage, 0, outputFile);
The input is a colored bmp file on mac OSX 10.9, cisst is compiled with opencv support.
When the time I completed the config of build option by cmake-gui, I started to make. Then a error came out:
[ 31%] Built target cisstNumerical
[ 31%] cisstDataGenerator for mtsParameterTypes
cisstDataGenerator: generating /home/frank/catkin_ws/src/build_cisst_saw/cisst/include/cisstMultiTask/mtsParameterTypes.h and /home/frank/catkin_ws/src/build_cisst_saw/cisst/cisstMultiTask/code/mtsParameterTypes_cdg.cpp from /home/frank/catkin_ws/src/cisst-saw/cisst/cisstMultiTask/code/../mtsParameterTypes.cdg
/home/frank/catkin_ws/src/cisst-saw/cisst/cisstMultiTask/code/../mtsParameterTyp"
in g:3: error: unexpected keyword "
global {
class {}
inline-header {}
inline-code {}
}
2:
': '
4:
Error, failed to parse file "/home/frank/catkin_ws/src/cisst-saw/cisst/cisstMultiTask/code/../mtsParameterTypes.cdg"
make[2]: *** [cisst/include/cisstMultiTask/mtsParameterTypes.h] Error 255
make[1]: *** [cisst/cisstMultiTask/code/CMakeFiles/cisstMultiTask.dir/all] Error 2
make: *** [all] Error 2
What should I do? Please help me!
To finish the initial setup of travis-ci, an administrator for this repository must go to travis-ci.org and link the build system to this repository, so that builds are actually executed, and add an image link indicating success/failure to the readme.md so the status can be seen by users.
Detailed compilation logs can be found in the following gist-logs.
Automatic compilation script to reproduce this issue on ubuntu 14.04:
bash <(curl -fsSL https://raw.githubusercontent.com/ahundt/homebrew-robotics/master/robonetracker.sh)
Please note this will take quite some time (hours), because it sets up a brand new environment from scratch! Also note that for the right things to be found you need to add something to your .bashrc
. Note that this changes your library and executable loading configuration! If you delete the line it will go back to the original configuration.
Detailed instructions can be found via homebrew-robotics in the README.md.
I expect this issue to be another related to capitalization, incorrect configuration, or something else in the CMakeLists.txt. It is probably exactly the same as one of the prior issues found on OS X when searching for cisstnetlib.
Would be nice to have a clean method to perform assignment (copy) between "subvectors" of fixed-sized vectors.
vct5 v5;
vc6 v6;
...
v5(1,3) = v6(2,3);
where
v5(a,b), a is the start index, b is the length of the subvector.
I don't need this at the moment but wanted to record the issue.
I have Qt5 installed on OS X using homebrew, but the cmake configuration script failed to find it.
Looking for Qt5: can't find Qt5Core
Looking for Qt5: can't find Qt5Widgets
Looking for Qt5: can't find Qt5Gui
Looking for Qt5: can't find Qt5OpenGL
brew info Qt5
Qt5: stable 5.4.2 (bottled), HEAD
Version 5 of the Qt framework
https://www.qt.io/
This formula is keg-only.
Qt 5 conflicts Qt 4 (which is currently much more widely used).
/usr/local/Cellar/Qt5/5.4.1 (6392 files, 289M)
Poured from bottle
/usr/local/Cellar/Qt5/5.4.2 (6319 files, 287M)
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/qt5.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Optional: d-bus ✔
==> Options
--universal
Build a universal binary
--with-d-bus
Build with d-bus support
--with-developer
Build and link with developer options
--with-docs
Build documentation
--with-examples
Build examples
--with-mysql
Build with mysql support
--with-oci
Build with Oracle OCI plugin
--HEAD
Install HEAD version
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.
This formula is keg-only, which means it was not symlinked into /usr/local.
Qt 5 conflicts Qt 4 (which is currently much more widely used).
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/Qt5/lib
CPPFLAGS: -I/usr/local/opt/Qt5/include
.app bundles were installed.
Run `brew linkapps Qt5` to symlink these to /Applications.
``
all the folders seem to be correctly present in the standard `/usr/local/include` location:
ls /usr/local/include/Qt
QtCore@ QtHelp@ QtScript@ QtTest@ QtXmlPatterns@
QtDeclarative@ QtMultimedia@ QtScriptTools@ QtUiTools@
QtDesigner@ QtNetwork@ QtSql@ QtWebKit@
QtGui@ QtOpenGL@ QtSvg@ QtXml@
It would be nice to have some basic methods to handle jacobian matrices and wrenches. Changing reference frame for example. This could go in cisstVector or cisstRobot.
It seems some of the new changes in the cmake are causing problems when ROS is NOT available.
CMake Error at thirdparty/cisst-saw/sawConstraintController/code/CMakeLists.txt:109 (cisst_is_catkin_build):
Unknown CMake command "cisst_is_catkin_build".
Probaby broken by this commit in sawConstraintController: 3f79d338376f3fc64b5378574829efb846f332fa
//roBehaviorSinusNavControl.h:
void SetMat(const vctDoubleMat &mat) { m = mat};
//roBehaviorSinusNavControl.cpp
providedInterface->AddCommandWrite(&roBehaviorSinusNavControl::SetMat, this, "SetMat");
//linker errors:
function mtsGenericObjectProxyBase<vctDynamicMatrix<double> >::Services() const: error: undefined reference to 'mtsGenericObjectProxy<vctDynamicMatrix<double> >::ClassServices()'
function vtable for mtsGenericObjectProxy<vctDynamicMatrix<double> >: error: undefined reference to 'mtsGenericObjectProxy<vctDynamicMatrix<double> >::Services() const'
//If I change the matrix to mts then it works:
void SetMat(const mtsDoubleMat &mat) { m = mat};
I'm attempting to set up an initial basic travis-ci build, with the goal of adding additional components to compile at each step. This involves the addition of a .travis.yaml configuration file, and setup of the travis-ci build on the travis-ci.org website.
I just updated cisstStereoVision (6ec2e33) to add cisstQt to the list of required cisst libraries for the cameraviewer and videoplayer examples. Without this change, it does not compile on Windows with VS 2008 and Qt 4.8.5 (64-bit) because the compiler cannot find <QApplication>
.
I noticed, however, that the CMakeLists.txt initially specifies that cisstStereoVisionQt (and now cisstQt) are required, whereas later in the file it checks the CISST_HAS_QT4
setting to determine whether to link with the cisstStereoVisionQt library. This does not seem to be the best implementation. Also, what about Qt5?
After I had updated my cmake, when I built dVRK 1.7.1 with catkin build, I found that cisst failed to be built. I tried several cmake versions, I found that when I used cmake 3.11 or higher versions, cisst failed to be built.
Error messages
Errors << cisst:make /mnt/ramdisk/catkin-jhu/logs_release/cisst/build.make.000.log
/mnt/ramdisk/catkin-jhu/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:76: Error: Unable to find 'cisstMultiTask/mtsExecutionResult.h'
/mnt/ramdisk/catkin-jhu/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:796: Error: Unable to find 'cisstMultiTask/mtsParameterTypes.h'
/mnt/ramdisk/catkin-jhu/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:802: Error: Unable to find 'cisstMultiTask/mtsComponentState.h'
/mnt/ramdisk/catkin-jhu/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:805: Error: Unable to find 'cisstMultiTask/mtsInterfaceCommon.h'
make[2]: *** [cisstMultiTask/codePython/cisstMultiTaskPYTHON_wrap.stamp] Error 1
make[2]: *** Deleting file 'cisstMultiTask/codePython/cisstMultiTaskPYTHON_wrap.stamp'
make[1]: *** [cisstMultiTask/codePython/CMakeFiles/gen_cisstMultiTaskPython_cisstMultiTaskPYTHON_wrap.dir/all] Error 2
I guess line 756 should come before line 755. Or they should be swapped. This is from different literatures that I have studied and makes sense since we should be calculation angular velocity of a link first and then its angular acceleration, and not the other way around.
Would be helpful to have an axis and angle constructor:
vctRodRot3(const vct3 &axis, const double &angle) { ... }
vct5 v5a;
vct5 v5b;
mtsDouble d;
v5a.XYZ() = v5b.XYZ() * d; //fails
//error: Invalid operands to binary expression ('vctFixedSizeVectorRef<double, 3, 1L>' and 'mtsDouble' (aka 'mtsGenericObjectProxy<double>'))
// the following works:
v5a.XYZ() = v5b.XYZ() * d.Data
I think some incorrect or non cross platform types were used in some cisstOSAbstraction code. Errors are below.
cisstOSAbstraction Group
Semantic Issue Group
/Users/athundt/source/robonetracker/thirdparty/cisst-saw/cisst/cisstOSAbstraction/code/osaSocket.cpp:437:30: Non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list
/Users/athundt/source/robonetracker/thirdparty/cisst-saw/cisst/cisstOSAbstraction/code/osaSocket.cpp:437:30: Insert an explicit cast to silence this issue
/Users/athundt/source/robonetracker/thirdparty/cisst-saw/cisst/cisstOSAbstraction/code/osaSocket.cpp:561:34: Non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list
/Users/athundt/source/robonetracker/thirdparty/cisst-saw/cisst/cisstOSAbstraction/code/osaSocket.cpp:561:34: Insert an explicit cast to silence this issue
/Users/athundt/source/robonetracker/thirdparty/cisst-saw/cisst/cisstOSAbstraction/code/osaSocket.cpp:740:34: Non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list
/Users/athundt/source/robonetracker/thirdparty/cisst-saw/cisst/cisstOSAbstraction/code/osaSocket.cpp:740:34: Insert an explicit cast to silence this issue
Using:
vctDoubleMat m(3,3);
m.Assign(1, 0, 0,
0, 1, 0,
0, 0, 1);
leads to garbage because the last arguments are stacked as ints and the va_arg macros expect doubles. Users have to specify 1.0 instead of 1. The simplest fix is to define for Assign methods to cover signatures with more parameters, maybe up to 16? A macro can be introduced for this. Based on feedback from @zchen24 and @marcinbalicki.
This error is displayed on launching cisstGlobalComponentManager.
config.GCM is being searched in cisst-1.0.2 instead of cisst-1.0
Here is my test code:
void test()
{
vctDoubleVec jnt_pos(6, 0.0);
vctFrm4x4 cpos;
robManipulator rob("/path/to/simpsm.rob");
cpos = rob.ForwardKinematics(jnt_pos);
}
int main()
{
for (size_t i = 0; i < 10; i++)
{
test();
}
}
Valgrind output
==17464== Memcheck, a memory error detector
==17464== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==17464== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==17464== Command: ./testrob
==17464==
==17464==
==17464== HEAP SUMMARY:
==17464== in use at exit: 79,744 bytes in 41 blocks
==17464== total heap usage: 2,426 allocs, 2,385 frees, 358,558 bytes allocated
==17464==
==17464== LEAK SUMMARY:
==17464== definitely lost: 1,120 bytes in 20 blocks
==17464== indirectly lost: 5,920 bytes in 20 blocks
==17464== possibly lost: 0 bytes in 0 blocks
==17464== still reachable: 72,704 bytes in 1 blocks
==17464== suppressed: 0 bytes in 0 blocks
==17464== Rerun with --leak-check=full to see details of leaked memory
==17464==
==17464== For counts of detected and suppressed errors, rerun with: -v
==17464== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
cmnData<std::string>::SerializeText
adds an escape character, '', before any spaces in the string being serialized. This breaks code in many argument constructors because they attempt to parse multiple parameters from a single string (in the FromStreamRaw
method). This is only used by the cisstComponentManager
, however, so it is not a major issue. My opinion is that we should preserve any escape characters already in the string, but not add any in SerializeText
. We could have a separate method (perhaps a helper function) to add escape characters to a string.
Dynamic component connection is not enabled by default. Currently the following code snippet has to be called during startup in one of the components to make the reconnection work
mtsInterfaceRequired *required = EnableDynamicComponentManagement();
The following should be adapted for cisst and cisst-saw:
jhu-saw/sawConstraintController#18
I want to install dvrk-ros in Ubuntu. I clone the cisst-saw files and when I use catkin build, I get errors. The files fail to be cloned and i only manage to successfully install 14 out of 30 packages. This occurs with the master branch. In the devel branch, I get a different error:
Does anyone have any suggestions how to overcome this problem and install the dvrk?
Thanks
Nick
Ran into a surprising data type mismatch issue - last line fails with "no viable overload = " on mac OS. Any thoughts?
mtsFrm4x4 goalFrm;
mtsFrm4x4 currentFrm;
mtsFrm4x4 diffFrm;
diffFrm.Translation() = goalFrm.Translation() - currentFrm.Translation();
diffFrm.Rotation() = goalFrm.Rotation() * currentFrm.Rotation().Transpose();
The unsightly workaround is below :
diffFrm.Rotation().Assign(goalFrm.Rotation() * currentFrm.Rotation().Transpose());
Output of tests:
!!!FAILURES!!!
Test Results:
Run: 119 Failures: 1 Errors: 0
1) test: nmrConstraintOptimizerTest::TestSolve (F) line: 142 /Users/anton/devel/cisst-saw/cisst/cisstNumerical/tests/nmrConstraintOptimizerTest.cpp
equality assertion failed
- Expected: 4
- Actual : 0
When running cisst tasks within the visual studio unit testing framework, it is important to be able to startup and shutdown the system while still holding on to the same process. I see a hack in the cisst sample tests related to this that was added a number of years back:
// the manager singleton needs to be cleaned up, adeguet1
std::cerr << "temporary hack " << CMN_LOG_DETAILS << std::endl;
manager->RemoveComponent("LCM_MCC");
manager->RemoveComponent("MCS");
However, this is not the only problem I am facing. I am able to trigger a crash and/or an error on disconnect by playing with the timing. A "simple" testcase is below, which I can use to trigger a crash by inserting a delay, or trigger an error by inserting a delay in a different spot.
#include <chrono>
#include <thread>
#include <stdint.h>
#include <cisstMultiTask/mtsTaskContinuous.h>
#include <cisstMultiTask/mtsTaskPeriodic.h>
#include <cisstMultiTask/mtsInterfaceRequired.h>
#include <cisstMultiTask/mtsInterfaceProvided.h>
class Server : public mtsTaskPeriodic
{
CMN_DECLARE_SERVICES(CMN_NO_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEBUG);
public:
Server();
virtual ~Server();
void Configure(const std::string & CMN_UNUSED(filename)) {};
void Startup(void);
void Run(void);
void Cleanup(void);
int32_t data_;
};
CMN_DECLARE_SERVICES_INSTANTIATION(Server);
class Client : public mtsTaskContinuous
{
CMN_DECLARE_SERVICES(CMN_NO_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEBUG);
public:
Client();
virtual ~Client();
struct {
mtsFunctionRead GetData;
} _Task;
void Configure(const std::string & CMN_UNUSED(filename)) {};
void Startup(void);
void Run(void);
void Cleanup(void);
};
CMN_DECLARE_SERVICES_INSTANTIATION(Client);
CMN_IMPLEMENT_SERVICES_DERIVED(Server, mtsTaskPeriodic);
CMN_IMPLEMENT_SERVICES_DERIVED(Client, mtsTaskContinuous);
Server::Server()
: mtsTaskPeriodic("server", 0.005, false)
{
StateTable.AddData(data_, "stab");
mtsInterfaceProvided *addI = this->AddInterfaceProvided("pi");
addI->AddCommandReadState(StateTable, data_, "c1");
}
Server::~Server()
{
}
void Server::Startup()
{
data_ = 0;
}
void Server::Cleanup()
{
}
void Server::Run()
{
ProcessQueuedCommands();
ProcessQueuedEvents();
data_++;
Sleep(0.002);
}
Client::Client()
: mtsTaskContinuous("client")
{
mtsInterfaceRequired *addI = AddInterfaceRequired("ri");
addI->AddFunction("c1", _Task.GetData);
}
Client::~Client()
{
}
void Client::Startup()
{
}
void Client::Cleanup()
{
}
void Client::Run()
{
ProcessQueuedCommands();
ProcessQueuedEvents();
Sleep(0.002);
}
int main(int argc, char **argv)
{
std::cout << "starting" << std::endl;
cmnLogger::SetMaskDefaultLog(CMN_LOG_ALLOW_ALL);
Server *svr = new Server();
Client *cli = new Client();
mtsManagerLocal *taskManager = mtsManagerLocal::GetInstance();
std::chrono::milliseconds dur(2000);
taskManager->AddComponent(svr);
taskManager->AddComponent(cli);
taskManager->Connect(cli->GetName(), "ri", svr->GetName(), "pi");
cli->_Task.GetData.IsValid();
taskManager->CreateAll();
taskManager->WaitForStateAll(mtsComponentState::READY, 2.0 * cmn_s);
taskManager->StartAll();
taskManager->WaitForStateAll(mtsComponentState::ACTIVE, 4.0 * cmn_s);
// If this delay is removed, the first GetData returns garbage
//std::this_thread::sleep_for(std::chrono::milliseconds(10));
int32_t data = -1;
std::cout << "data " << std::to_string(data) << std::endl;
cli->_Task.GetData(data);
std::cout << "data " << std::to_string(data) << std::endl;
std::this_thread::sleep_for(dur);
cli->_Task.GetData(data);
std::cout << "data " << std::to_string(data) << std::endl;
std::this_thread::sleep_for(dur);
cli->_Task.GetData(data);
std::cout << "data " << std::to_string(data) << std::endl;
taskManager->KillAll();
taskManager->WaitForStateAll(mtsComponentState::FINISHED, 2.0 * cmn_s);
std::cout << "disconnecting" << std::endl;
taskManager->Disconnect(cli->GetName(), "ri", svr->GetName(), "pi");
std::cout << "finished disconnect call" << std::endl;
// If this delay is added a crash happens within mtsManagerComponentClient::DisconnectLocally (when ultimately calling mtsMailBox::Write)
std::this_thread::sleep_for(dur);
std::cout << "finished sleep after disconnect" << std::endl;
taskManager->RemoveComponent(cli);
taskManager->RemoveComponent(svr);
// If this delay is added (and the previous one removed to avoid the crash), cisst errors are logged regarding disconnect issues
std::this_thread::sleep_for(dur);
std::cout << "finished sleep after remove components" << std::endl;
delete cli;
delete svr;
std::cout << "exiting" << std::endl;
}
CMaking of cisst branch fails due to missing license.txt file:
Configuring cisst 1.0 from "/Users/MJ/project/fault/cisst", revision: undefined
CMake Error at /opt/local/share/cmake-2.8/Modules/CPack.cmake:395 (message):
CPack license resource file: "/license.txt" could not be found.
Call Stack (most recent call first):
/opt/local/share/cmake-2.8/Modules/CPack.cmake:400 (cpack_check_file_exists)
CMakeLists.txt:526 (include)
The master doesn't have this issue. This seems to be different locations of license.txt file between master and branches. Different folder structures between master and branch -- master has each library at the top, whereas all branches have those libraries under 'cisst' folder -- may be causing this issue.
Building cisst
fails when the C++17 standard is specified (i.e. /std:c++17
for Visual Studio). This is due to the use of some functions/constructs in the standard template library that were removed in C++17 (std::binary_function
for example).
I tried to build the latest cisst on feature-cxx-compatibility branch with catkin on Ubuntu 16.04 with gcc 5.4
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14
but cisst build fails. The error mesage is
src/cisst-saw/cisst/cisstCommon/cmnPortability.h:395:33: error: ‘isnan’ was not declared in this scope #define CMN_ISNAN(x) isnan(x)
because CISST_USE_STD_ISNAN, CISST_USE_STD_ISFINITE and CISST_USE_CMATH are not defined. The definitions of CISST_USE_STD_ISNAN, CISST_USE_STD_ISFINITE and CISST_USE_CMATH are removed by this commit
In order to build dvrk-ros with C++ 14 standard on Ubuntu 16.04 with gcc 5.4, we need to
Fresh clone and build with CISST_HAS_JSON
libcisstMultiTask.so: undefined reference to cmnDataJSON<unsigned long>::SerializeText(unsigned long const&, Json::Value&)' libcisstMultiTask.so: undefined reference to
cmnDataJSON::DeSerializeText(unsigned long&, Json::Value const&)'
I understand that the master branch is stable, whereas the devel branch is used for normal commits, but what is the convention for updating the master? i.e., who is responsible for merging, is there a schedule to it, is it tied to release tags, etc..
Could not find any help on wiki, under development guidelines.
Consider the following CMakeLists.txt
cmake_minimum_required(3.0)
project(MyProject)
add_subdirectory(cisstNetlib)
add_subdirectory(cisst-saw)
include_directories(CISSTNETLIB_INCLUDE_DIRS)
add_library(mylib mylib.cpp)
target_link_libraries(mylib ${CISSTNETLIB_LIBRARIES} ${CISST_SAW_LIBRARIES)
This seems like a very reasonable way to structure a build, but right now it doesn't work.
I would appreciate if support for this build style could be added to cisst, cisst-saw, and cisstNetlib.
Currently the following must be added to get partial support working, in this case the files are in a thirdparty subdirectory:
set(CISSTNETLIB_FOUND TRUE)
set(CISSTNETLIB_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cisstNetlib/include
${CMAKE_CURRENT_BINARY_DIR}/thirdparty/cisstNetlib/include
)
set(CISSTNETLIB_INCLUDE_DIR ${CISSTNETLIB_INCLUDE_DIRS}) #hack to deal with this variable being used in cisstNumerical
set(CISSTNETLIB_LIBRARIES
cisstNetlib
cisstNetlib_hanson_haskell
cisstNetlib_lawson_hanson
#cisstNetlib_lapack
#cisstNetlib_blas
#cisstNetlib_f2c
)
set(CISST_SAW_FOUND TRUE)
set(CISST_SAW_INCLUDE_DIRS
#binary
${CMAKE_CURRENT_BINARY_DIR}/thirdparty/cisst-saw/cisst/include
${CISST_SAW_PLATFORM_SPECIFIC_INCLUDES}
#source
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cisst-saw/cisst
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cisst-saw/sawConstraintController/include
)
set(CISST_SAW_LIBRARIES
sawConstraintController
cisstCommon
cisstNumerical
cisstMultiTask
)
The appropriate variables and configuration should be set completely and correctly even when being built as a subdirectory of a parent build directory for maximum reusability and ease of use.
I've installed cisstNetlib on my OS (c version) installed in /usr/local
, and currently the cmake script is failing to find the installed version. Detailed logs can be found here
==> cmake . -DCMAKE_C_FLAGS_RELEASE= -DCMAKE_CXX_FLAGS_RELEASE= -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/cisst/HEAD -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DCISST_BUILD_EXAMPLES=OFF -DCISST_BUILD_SHARED_LIBS=OFF -DCISST_BUILD_TESTS=OFF -DCISST_HAS_CISSTNETLIB=ON -DCISST_HAS_IOS=OFF -DCISST_HAS_JSON=OFF -DCISST_HAS_QT4=OFF -DCISST_MTS_HAS_ICE=OFF -DCISST_USE_EXTERNAL=OFF -DCISST_XML_LIB=LibXml2 -DCISST_cisst3DUserInterface=OFF -DCISST_cisstCommon=ON -DCISST_cisstCommonXML=ON -DCISST_cisstInteractive=OFF -DCISST_cisstMultiTask=ON -DCISST_cisstNumerical=ON -DCISST_cisstOSAbstraction=ON -DCISST_cisstParameterTypes=ON -DCISST_cisstRobot=ON -DCISST_cisstStereoVision=OFF -DCISST_cisstVector=ON -DCMAKE_BUILD_TYPE=Debug
-- Found Threads: TRUE
CMake Error at cmake/cisstInternalMacros.cmake:69 (message):
cisst_set_package_settings: value for variable LIBRARIES provided for
package cisstNetlib used by library cisstNumerical is not properly defined
Call Stack (most recent call first):
cisstNumerical/CMakeLists.txt:25 (cisst_set_package_settings)
Information: all libraries and settings have been found for /tmp/cisst20150928-40995-kxbqv9/cisstMultiTask/applications/cisstComponentManager, it is possible cisst-config.cmake has not been found yet, make sure the CMake configuration is complete first.
Information: all libraries and settings have been found for /tmp/cisst20150928-40995-kxbqv9/cisstMultiTask/applications/cisstLogger, it is possible cisst-config.cmake has not been found yet, make sure the CMake configuration is complete first.
Information: code in /tmp/cisst20150928-40995-kxbqv9/cisstRobot/applications/cisstRandomJoints will not be compiled, it requires cisstCommon;cisstVector;cisstOSAbstraction;cisstRobot;cisstNumerical
Information: code in /tmp/cisst20150928-40995-kxbqv9/cisstRobot/applications/cisstForwardKinematics will not be compiled, it requires cisstCommon;cisstVector;cisstOSAbstraction;cisstRobot;cisstNumerical
Information: code in /tmp/cisst20150928-40995-kxbqv9/cisstRobot/applications/cisstKinematicsIdentification will not be compiled, it requires cisstCommon;cisstVector;cisstOSAbstraction;cisstRobot;cisstNumerical
Information: code in /tmp/cisst20150928-40995-kxbqv9/cisstRobot/applications/cisstRobotSensorCalibration will not be compiled, it requires cisstCommon;cisstVector;cisstOSAbstraction;cisstRobot;cisstNumerical
-- Configuring incomplete, errors occurred!
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/science
brew tap ahundt/robotics
brew install --HEAD --cc=clang --build-from-source --with-debug -vd --HEAD cisstnetlib
brew install --HEAD --cc=clang --build-from-source --with-debug -vd --HEAD cisst
When building cisst with ClangCl in MSVC 2019, the cisstVector
build fails with the following error:
E:\Repositories\cisst\cisst-src\cisstVector/vctEulerRotation3.h(384,1): Error: explicit instantiation of undefined function template 'vctEulerFromMatrixRotation3'
2> expanded from macro 'VCT_DECLARE_EULER_CONVERSION_TEMPLATES'
2> explicit instantiation refers here
2> expanded from macro 'VCT_DECLARE_EULER_CONVERSIONS'
The error is repeated multiple times. I can post the full error output if needed.
It seems that this is due to a mis-identification of MSVC as the compiler since clang-cl
is meant to be a drop in replacement for cl
.
See here for more info on using clang with MSVC 2019.
In 639ee10, we added some code to generate a readable revision info using git describe
. The file generated is then included by many parts of cisst/SAW and this leads to tons of re-compilations and re-links.
A first fixed was checked-in in 3ae04a1, i.e. the file cisstRevision.h is now re-generated only when git revision changes, not every time CMake runs.
There is still an issue with the cisstDataGenerator. i.e. the code is generated overtime the git revision changes and has to be recompiled even if the generated code hasn't changed. One simple fix is to generated the code in temporary files and push it to the build tree only if it's different from the existing one (maybe using the CMake -E copy_if_different in the cisstMacro.cmake).
I'm trying to compile and integrate cisst and my toolset utilizes opencv3. I ran into an issue because it seems cisst utilized some headers that have been deprecated in opencv2 for several years and finally retired in opencv3.
As a start any of the headers in opencv2/legacy
have been retired and no longer exist.
In particular the first batch of these headers are included in svlTypes.h. There are probably additional instances in other files.
Additionally, opencv2/contrib
has been moved to a separate repository opencv_contrib that must be compiled alongside opencv.
In file included from /Users/athundt/source/cisst/cisstStereoVision/svlBufferImage.h:27:
/Users/athundt/source/cisst/cisstStereoVision/svlTypes.h:61:14: fatal error:
'opencv2/contrib/contrib.hpp' file not found
#include <opencv2/contrib/contrib.hpp>
Any help would be very much appreciated!
The following code does not produce the expected result:
if (condition)
CMN_LOG_RUN_VERBOSE << "Some text" << std::endl;
else {
// some more code
}
This appears to be due to the macro used to define CMN_LOG
(note that CMN_LOG_RUN_VERBOSE
just calls CMN_LOG
with a specified lod
):
#define CMN_LOG(lod) \
if (cmnLogger::GetMask() & cmnLogger::GetMaskFunction() & lod) \
((cmnLODOutputMultiplexer(cmnLogger::GetMultiplexer(), lod).Ref()) << cmnLogLevelToString(lod) << " ")
Simplifying the above, CMN_LOG(lod)
essentially expands to the following:
if (filterTrue)
cmnLODOutputMultiplexerRef << user_string << " "
Thus, the original code is compiled as follows, where the else
is indented to better indicate the problem:
if (condition)
if (filterTrue)
cmnLODOutputMultiplexerRef << "Some text" << " " << std::endl;
else {
// some more code
}
I believe the fix would be to put braces around the entire CMN_LOG
macro, e.g.:
#define CMN_LOG(lod) \
{ if (cmnLogger::GetMask() & cmnLogger::GetMaskFunction() & lod) \
((cmnLODOutputMultiplexer(cmnLogger::GetMultiplexer(), lod).Ref()) << cmnLogLevelToString(lod) << " ") }
Right now the location of packages has to be configured manually. If we instead add them to the package registry this can occur automatically.
Hi,
I'm seeing some unexpected behavior using v1.0.6 on Ubuntu 14.04. When running the return value for mtsComponentManager::Connect() appears to be returning TRUE even when the interfaces were not successfully connected. In the code below, I expect the printed value ret
to be 0, but I'm seeing 1.
#include <cisstMultiTask/mtsTaskManager.h>
int main ( int argc, char *argv[] )
{
cmnLogger::SetMask ( CMN_LOG_ALLOW_DEFAULT );
cmnLogger::SetMaskClassAll ( CMN_LOG_ALLOW_DEFAULT );
cmnLogger::SetMaskFunction ( CMN_LOG_ALLOW_DEFAULT );
cmnLogger::SetMaskDefaultLog ( CMN_LOG_ALLOW_DEFAULT );
cmnLogger::AddChannel ( std::cout, CMN_LOG_ALLOW_DEFAULT );
// Component manager
mtsComponentManager *taskManager = mtsComponentManager::GetInstance();
bool ret = taskManager->Connect ( "", "", "", "" );
std::cout << "***" << ret << "***" << std::endl;
return 0;
}
In file included from ~/dev/src/cisst-saw/sawATIForceSensor/examples/mainSimulator.cpp:23:
In file included from ~/dev/build/cisst-saw-x/cisst/include/cisstCommon.h:45:
~/dev/src/cisst-saw/cisst/cisstCommon/cmnPrintf.h:315:16: error: no viable conversion from returned value of type 'std::ostream' (aka 'basic_ostream<char>') to function return type 'bool'
return OutputStream;
^~~~~~~~~~~~
The cmake macro CISST_OSTREAM_CAN_CAST_TO_INT to 1
Setup:
latest devel branch on Mac OS Sierra
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Not sure why this is happening but here is a workaround:
** One fix:**
remove : #include <cisstCommon.h> from sawATIForceSensor/examples/mainSimulator.cpp:23
change #include <cisstCommon.h> to #include <cisstCommon/cmnUnits.h> in sawATIForceSensor/sawATINetFTSimulatorQtWidget.cpp:23
I'm attempting to build cisst-saw
with catkin build
in a fresh catkin workspace. I tried both master
and devel
branch and they produce the same error. reverting cisst
submodule to 1.0.8
tag produces a different dependency error.
ROS Kinetic, Ubuntu 16.04
Building with ROS Indigo and Ubuntu 14.04 works.
Errors << cisst:make /home/cos/pmd-dvrk/logs_release/cisst/build.make.001.log
/usr/bin/ld: cannot find -lReflexxesTypeII
collect2: error: ld returned 1 exit status
make[2]: *** [/home/cos/pmd-dvrk/devel_release/.private/cisst/bin/cisstRandomJoints] Error 1
make[1]: *** [cisstRobot/applications/cisstRandomJoints/CMakeFiles/cisstRandomJoints.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: cannot find -lReflexxesTypeII
collect2: error: ld returned 1 exit status
make[2]: *** [/home/cos/pmd-dvrk/devel_release/.private/cisst/bin/cisstForwardKinematics] Error 1
make[1]: *** [cisstRobot/applications/cisstForwardKinematics/CMakeFiles/cisstForwardKinematics.dir/all] Error 2
/usr/bin/ld: cannot find -lReflexxesTypeII
collect2: error: ld returned 1 exit status
make[2]: *** [/home/cos/pmd-dvrk/devel_release/.private/cisst/bin/cisstKinematicsIdentification] Error 1
make[1]: *** [cisstRobot/applications/cisstKinematicsIdentification/CMakeFiles/cisstKinematicsIdentification.dir/all] Error 2
/usr/bin/ld: cannot find -lReflexxesTypeII
collect2: error: ld returned 1 exit status
make[2]: *** [/home/cos/pmd-dvrk/devel_release/.private/cisst/bin/cisstRobotSensorCalibration] Error 1
make[1]: *** [cisstRobot/applications/cisstRobotSensorCalibration/CMakeFiles/cisstRobotSensorCalibration.dir/all] Error 2
make: *** [all] Error 2
cd /home/cos/pmd-dvrk/build_release/cisst; catkin build --get-env cisst | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
Any help will be appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.