Hi RoboStack
Thanks for a cool repo.
Sadly i am not able to compile the example publisher, and either integrate it in my own package.
Getting this error:
In file included from /usr/include/xtensor/xview.hpp:20:0,
from /usr/include/xtensor/xio.hpp:22,
from /home/omen/src/catkin_ws/src/xtensor-ros-master/src/publisher.cpp:4:
/usr/include/xtensor/xcontainer.hpp: In instantiation of ‘void xt::xstrided_container<D, L>::reshape(const S&, const strides_type&) [with S = std::vector; D = xt::xarray_adaptor<const std::vector, (xt::layout_type)0, std::vector >; xt::layout_type L = (xt::layout_type)0; xt::xstrided_container<D, L>::strides_type = std::vector]’:
/usr/include/xtensor/xarray.hpp:466:27: required from ‘xt::xarray_adaptor<EC, L, SC>::xarray_adaptor(xt::xarray_adaptor<EC, L, SC>::container_closure_type, const shape_type&, const strides_type&) [with EC = const std::vector; xt::layout_type L = (xt::layout_type)0; SC = std::vector; xt::xarray_adaptor<EC, L, SC>::container_closure_type = const std::vector&; xt::xarray_adaptor<EC, L, SC>::shape_type = std::vector; xt::xarray_adaptor<EC, L, SC>::strides_type = std::vector]’
/usr/include/xtensor/xadapt.hpp:152:16: required from ‘std::enable_if_t<(! xt::detail::is_array<SC>::value), xt::xarray_adaptor<C, (xt::layout_type)0, SC> > xt::xadapt(C&, const SC&, const SC&) [with C = const std::vector; SC = std::vector; std::enable_if_t<(! xt::detail::is_array<SC>::value), xt::xarray_adaptor<C, (xt::layout_type)0, SC> > = xt::xarray_adaptor<const std::vector, (xt::layout_type)0, std::vector >]’
/home/omen/src/catkin_ws/src/xtensor-ros-master/src/include/conversions.hpp:45:55: required from here
/usr/include/xtensor/xcontainer.hpp:856:9: error: passing ‘xt::xcontainer<xt::xarray_adaptor<const std::vector, (xt::layout_type)0, std::vector > >::container_type {aka const std::vector}’ as ‘this’ argument discards qualifiers [-fpermissive]
this->data().resize(compute_size(m_shape));
^~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/boost/math/special_functions/math_fwd.hpp:26,
from /usr/include/boost/math/special_functions/round.hpp:15,
from /opt/ros/melodic/include/ros/time.h:58,
from /opt/ros/melodic/include/ros/ros.h:38,
from /home/omen/src/catkin_ws/src/xtensor-ros-master/src/publisher.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:689:7: note: in call to ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = double; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
resize(size_type __new_size)
^~~~~~
xtensor-ros-master/CMakeFiles/publisher.dir/build.make:62: recipe for target 'xtensor-ros-master/CMakeFiles/publisher.dir/src/publisher.cpp.o' failed
make[2]: *** [xtensor-ros-master/CMakeFiles/publisher.dir/src/publisher.cpp.o] Error 1
CMakeFiles/Makefile2:6129: recipe for target 'xtensor-ros-master/CMakeFiles/publisher.dir/all' failed
make[1]: *** [xtensor-ros-master/CMakeFiles/publisher.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j12 -l12" failed
Hope you are able ti help.
Best regards
DenLar