I've developped a shiny application.
It works fine localy (runApp)but not with Shiny-server.
I've got this error message :
Error : Function "showOutput" not found.
like Rcharts package was not found...but it's already installed.
> > sessionInfo() R version 3.1.2 (2014-10-31) Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C
> LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C
> LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C
> LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
>
> attached base packages: [1] stats graphics grDevices utils
> datasets methods base
>
> other attached packages: [1] lattice_0.20-29 data.table_1.9.4
> lubridate_1.3.3 xts_0.9-7 zoo_1.7-11 rCharts_0.4.5
> leaflet_1.0 shiny_0.11.1 RPostgreSQL_0.4 DBI_0.3.1
>
> loaded via a namespace (and not attached): [1] R6_2.0.1
> RJSONIO_1.3-0 Rcpp_0.11.4 chron_2.3-45 digest_0.6.8
> grid_3.1.2 htmltools_0.2.6 httpuv_1.3.2 memoise_0.2.1
> mime_0.2 [11] plyr_1.8.1 reshape2_1.4.1 stringr_0.6.2
> tools_3.1.2 whisker_0.3-2 xtable_1.7-4 yaml_2.1.13
i've updated all my packages...but it still doesn't work..
Packages are installed in the global library as :
DBI "DBI" "/usr/lib/R/library"
KernSmooth "KernSmooth" "/usr/lib/R/library"
MASS "MASS" "/usr/lib/R/library"
Matrix "Matrix" "/usr/lib/R/library"
RCurl "RCurl" "/usr/lib/R/library"
RPostgreSQL "RPostgreSQL" "/usr/lib/R/library"
base "base" "/usr/lib/R/library"
bitops "bitops" "/usr/lib/R/library"
boot "boot" "/usr/lib/R/library"
class "class" "/usr/lib/R/library"
cluster "cluster" "/usr/lib/R/library"
codetools "codetools" "/usr/lib/R/library"
compiler "compiler" "/usr/lib/R/library"
data.table "data.table" "/usr/lib/R/library"
datasets "datasets" "/usr/lib/R/library"
devtools "devtools" "/usr/lib/R/library"
expsmooth "expsmooth" "/usr/lib/R/library"
fma "fma" "/usr/lib/R/library"
foreign "foreign" "/usr/lib/R/library"
fpp "fpp" "/usr/lib/R/library"
grDevices "grDevices" "/usr/lib/R/library"
graphics "graphics" "/usr/lib/R/library"
grid "grid" "/usr/lib/R/library"
httr "httr" "/usr/lib/R/library"
lattice "lattice" "/usr/lib/R/library"
leaflet "leaflet" "/usr/lib/R/library"
lmtest "lmtest" "/usr/lib/R/library"
lubridate "lubridate" "/usr/lib/R/library"
methods "methods" "/usr/lib/R/library"
mgcv "mgcv" "/usr/lib/R/library"
nlme "nlme" "/usr/lib/R/library"
nnet "nnet" "/usr/lib/R/library"
parallel "parallel" "/usr/lib/R/library"
plyr "plyr" "/usr/lib/R/library"
rCharts "rCharts" "/usr/lib/R/library"
rpart "rpart" "/usr/lib/R/library"
spatial "spatial" "/usr/lib/R/library"
splines "splines" "/usr/lib/R/library"
stats "stats" "/usr/lib/R/library"
stats4 "stats4" "/usr/lib/R/library"
stringr "stringr" "/usr/lib/R/library"
survival "survival" "/usr/lib/R/library"
tcltk "tcltk" "/usr/lib/R/library"
tools "tools" "/usr/lib/R/library"
utils "utils" "/usr/lib/R/library"
whisker "whisker" "/usr/lib/R/library"
xts "xts" "/usr/lib/R/library"
yaml "yaml" "/usr/lib/R/library"
thanks for your help.
Related
I have been facing linking issues when including various ROS packages and Drake as libraries, and have narrowed the issue down to VTK.
It seems that ROS(noetic) PCL depends on VTK 7.1.0 whereas Drake depends on VTK 9.1.0 after running ldd:
linux-vdso.so.1 (0x00007fffa88ea000)
libdrake.so => /opt/drake/lib/libdrake.so (0x00007f644589d000)
libpcl_io.so.1.10 => /lib/x86_64-linux-gnu/libpcl_io.so.1.10 (0x00007f64455d7000)
libvtkCommonCore-7.1.so.7.1p => /lib/x86_64-linux-gnu/libvtkCommonCore-7.1.so.7.1p (0x00007f644528b000)
libvtkFiltersGeneral-7.1.so.7.1p => /lib/x86_64-linux-gnu/libvtkFiltersGeneral-7.1.so.7.1p (0x00007f6444f41000)
libvtkRenderingCore-7.1.so.7.1p => /lib/x86_64-linux-gnu/libvtkRenderingCore-7.1.so.7.1p (0x00007f6444c30000)
libvtkRenderingOpenGL2-7.1.so.7.1p => /lib/x86_64-linux-gnu/libvtkRenderingOpenGL2-7.1.so.7.1p (0x00007f6444907000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6444725000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6444533000)
libdrake_lcm.so => /opt/drake/lib/libdrake_lcm.so (0x00007f644451a000)
libdrake_marker.so => /opt/drake/lib/libdrake_marker.so (0x00007f6444517000)
libvtksys-9.1.so.1 => /opt/drake/lib/libvtksys-9.1.so.1 (0x00007f64444c2000)
libvtkfmt-9.1.so.1 => /opt/drake/lib/libvtkfmt-9.1.so.1 (0x00007f644449b000)
libvtkkissfft-9.1.so.1 => /opt/drake/lib/libvtkkissfft-9.1.so.1 (0x00007f6444493000)
libvtkloguru-9.1.so.1 => /opt/drake/lib/libvtkloguru-9.1.so.1 (0x00007f6444459000)
...
My CMakeLists.txt is defined as:
cmake_minimum_required(VERSION 3.10)
project(my_project)
find_package(catkin REQUIRED COMPONENTS
roscpp
pcl_ros
)
find_package(drake CONFIG REQUIRED PATHS /opt/drake)
catkin_package(
CATKIN_DEPENDS roscpp pcl_ros
DEPENDS drake
)
include_directories(${catkin_INCLUDE_DIRS})
add_executable(my_test test.cpp)
target_link_libraries(my_test drake::drake ${catkin_LIBRARIES})
and package.xml as
....
<buildtool_depend>catkin</buildtool_depend>
<depend>roscpp</depend>
<depend>pcl_ros</depend>
</package>
Simply including vtk headers causes immediate an segmentation fault:
#include "drake/systems/framework/diagram_builder.h"
#include <vtkPolyData.h>
int main() {
drake::systems::DiagramBuilder<double> builder;
return 0;
}
That's correct -- VTK's library symbols are not version-namespaced, so you cannot load two different VTK versions into the same process, even for two completely independent uses. This is not unique to Drake; it's generally true about VTK.
The only challenge with Drake is that (1) Drake's pre-compiled binaries are built against a specific version of VTK that differs from ROS PCL's VTK, and (2) even for a Drake source build, Drake doesn't make it very easy to change which version of VTK will be linked. Unlike Eigen or spdlog or fmt, Drake's VTK dependency is not designed to be end-user-serviceable.
To avoid problems like this, Drake is actively working on linking VTK privately. Follow #16502 for updates. ETA for the fix should be within the next month or two.
In the meantime, there are not many good work-arounds.
The only easy one is to carefully link to only the parts of PCL that do not depend on VTK. For example, the PCL KDTree does not use VTK (should be safe), but the PCL IO does use VTK (will segfault). If your problem is only over-linking, then fixing your build to link fewer unnecessary things might resolve it.
The other work-around is to put a process boundary between your Drake-using code and PCL-with-VTK-using-code, with some kind of a message channel inbetween. That is, rework your code to only ever load Drake in some programs, and PCL in others, and never the two shall meet.
Hopefully, the Drake feature 16502 will be resolved soon, making this all moot.
As of tonight's nightly build (20221117 or greater) or the next stable release (v1.11.0 or newer), Drake will use Ubuntu's build of VTK 9.1 when running on Ubuntu 22.04 (aka "Jammy"). In case you can run a version of ROS on Ubuntu 22.04, hopefully it would use a compatible VTK 9.1 and PCL would work.
I have added meta-openembedded recipes in the Yocto project, at Jethro branch OpenCV version is 2.4.
After building while testing the sample applications provided by opencv-samples_2.4.bb gives these samples :
adaptiveskindetector contours facedetect find_obj_calonder morphology mushroom pyramid_segmentation
bgfg_codebook convert_cascade fback_c find_obj_ferns motempl one_way_sample smiledetect
blobtrack_sample delaunay find_obj latentsvmdetect mser_sample polar_transforms tree_engine
but while testing I got this error :
OpenCV Error: Unspecified error (The function is not implemented.
Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you
are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then
re-run cmake or configure script) in cvNamedWindow, file
/home/ymj/opencv/modules/highgui/src/window.cpp, line 516
I have added in local.conf:
IMAGE_INSTALL_append += " opencv opencv-samples python-opencv"
Is anything more needed to get full-fledged opencv operations.
I have been losing my head over this for some time now. So I need to use the opencv in a ros melodic package built by the catkin on the Ubuntu 18.04. The idea is to make a package which is actually just a library and this library using all the regular ros packages (image_transport, cv_bridge, roscpp, rospy, std_msgs, genmsg, tf, actionlib_msgs, actionlib ).
Just to let you know, I have 2 opencv installed, the openCV 3.2 in the usr/share and the openCV 4.3 in the usr/local/share, that is why I have specifically set the openCV_DIR to point to the 3.2 version.
I have tried to add message to the CMakeList.txt to print out the opencv_version, opencv_include_dir and opencv_libs and the version is 3.2.0, include_dirs is /usr/include;/usr/include/opencv and libs are opencv_calib3d;opencv_core;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_viz;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_datasets;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
in my pkg_library CMakeList.txt I have this:
cmake_minimum_required(VERSION 2.8.3)
project(pkg_libraries)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
set( OpenCV_DIR "/usr/share/OpenCV/" )
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(
catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
genmsg
tf
actionlib_msgs
actionlib
sensor_msgs
cv_bridge
image_transport
message_generation
)
find_package(
OpenCV REQUIRED
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES pkg_libraries
CATKIN_DEPENDS roscpp rospy std_msgs tf actionlib actionlib_msgs cv_bridge
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
add_library(${PROJECT_NAME}
src/imageSaver.cpp
)
target_link_libraries( ${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBS} )
install(
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(
DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
the compilation of the pkg_libraries with the catkin_build looks just fine, but later when I try to do catkin_build in the another package which includes the pkg_libraries, it fails with the error:
libpkg_libraries.so: undefined reference to
`cv::imwrite(std::__cxx11::basic_string,
std::allocator > const&, cv::_InputArray const&,
std::vector > const&)'
Which I would say looks like the linker error, because I have used the cv::imwrite only in the pkg_libraries. and the package which reports the error includes only the pkg_libraries. So the pkg_libraries but it is obviously not linked properly, but it is built without errors.
What am I missing here?
Thanks
the problem was because of the pkg_libraries is built like a shared library in which I have had another .cpp and .h which were using different openCV versions (default opencv 3.2) and I think the problem happened because by loading the libpkg_libraries.so I have made a conflict between openCV version.
Anyway, now I have made separate libraries and it works as it suppose to work.
Thanks
While trying to run Pkg.add(...) for some Julia packages, we encountered the following error:
ERROR: Build process failed.
build!(::Array{String,1}, ::Set{Any}, ::String) at ./pkg/entry.jl:629
build!(::Array{String,1}, ::Set{Any}, ::String) at ./pkg/entry.jl:626 (repeats 2 times)
build!(::Array{String,1}, ::Dict{Any,Any}, ::Set{Any}) at ./pkg/entry.jl:637
build(::Array{String,1}) at ./pkg/entry.jl:652
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}, ::Dict{String,VersionNumber}, ::Set{String}) at ./pkg/entry.jl:572
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}) at ./pkg/entry.jl:479
edit(::Function, ::String, ::Base.Pkg.Types.VersionSet, ::Vararg{Base.Pkg.Types.VersionSet,N} where N) at ./pkg/entry.jl:30
(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at ./task.jl:335
Stacktrace:
[1] sync_end() at ./task.jl:287
[2] macro expansion at ./task.jl:303 [inlined]
[3] add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
[4] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:36
[5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:70
[6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36
[7] add(::String) at ./pkg/pkg.jl:117
The Funny thing is that if we try to rerun Pkg.add(...) for the same package, it works!
e.g Running Pkg.add("DataArrays") fails with above error first, but upon re-running the same command, it's installed correctly.
Is it possible that the underlying C/C++ libraries may be causing issues?
Environment:
Docker with Debian GNU/Linux 8.6 (jessie) Julia 0.6.3
earlier versions of julia are not quite stable...
my way to solve various problems is to rm -rf ~/.julia
so as to reinstall and rebuild all packages... I don know why but it works
anyway, julia is now v1.1.0 (in dev, and v1.0.1 in release)
upgrade is recommanded
You can also try using version 0.7 as this crossover version should be largely compatible with both 0.6 and 1.0 code
I'm getting this error when I catkin_make my workspace:
[100%] Linking CXX executable /home/ankilp/test_ws/devel/lib/lidar_depth/lidar_depth
/usr/bin/ld: cannot find -lQt5::Widgets
This is my CMakeList file:
cmake_minimum_required(VERSION 2.8.3)
project(lidar_depth)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
genmsg
)
find_package( PCL REQUIRED)
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})
add_definitions(-DQT_NO_KEYWORDS)
catkin_package(
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(${PROJECT_NAME} src/LidarDepth.cpp src/Projection_matrices.hpp)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${QT_LIBRARIES}
)
I don't explicitly use anything related to Qt. I installed Qt5 separately but the problem persists. Is there a separate process to link Qt to my system?
It looks like you're using at least ROS Kinetic (based on the comment where you add compile options). Most things in Kinetic depend on Qt5 instead of Qt4. Try making the following changes to your CMakeLists.txt file:
Replace this line
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
with these lines
find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
set(QT_LIBRARIES Qt5::Widgets)
If this doesn't work for you, leave a comment as I have a working CMakeLists.txt file for Qt5 in Kinetic and can probably determine what else needs changed, but I think that is the minimal change to make.
If you have installed Qt seperately, you have to tell CMAKE where it can find you installation. This can be done by specifying the CMAKE_PREFIX_PATH inside the CMakeLists.txt file or in the terminal before executing cmake (ref). E.g.:
$ export CMAKE_PREFIX_PATH=/location/to/you/installation