Dear List,
I am trying to write a typekit for the following type:
# compliant_control-types.hpp
struct MotionSpec
{
bool control_types[6];
double desired_vals[6];
};
My code is the following:
#include <rtt/types/SequenceTypeInfo.hp
#include <rtt/types/StructTypeInfo.hp
#include <rtt/types/CArrayTypeInfo.hp
#include <rtt/types/BoostArrayTypeInfo.hp
#include "../compliant_control-types.hpp"
using namespace RTT::types;
namespace boost {
namespace serialization {
template <class Archive>
void serialize ( Archive & a, MotionSpec & ms, unsigned int) {
using boost::serialization::make_nvp;
a & make_nvp("control_types", ms.control_types);
a & make_nvp("desired_vals", ms.desired_vals);
}
}
}
struct MotionSpecTypeInfo
: public RTT::types::StructTypeInfo<MotionSpec>
{
MotionSpecTypeInfo()
: RTT::types::StructTypeInfo<MotionSpec>("MotionSpec")
{}
};
void load_motion_spec_types()
{
RTT::types::Types()->addType( new CArrayTypeInfo<bool>("bool[]") );
RTT::types::Types()->addType( new CArrayTypeInfo<double>("double[]") );
RTT::types::Types()->addType( new MotionSpecTypeInfo);
}
It works when I change the two CArrays into std::vectors, but I'd like
to fix the size to 6. From reading the docs (2.1.1. Struct versus
Sequence), see "unsigned int timestamp[2];" example it appears this
should work by using CArrayTypeInfo.
The error follows below.
Thanks in advance.
Markus
[rospack] opendir error [No such file or directory] while crawling /home/mk/src/git/orocos/compliant_control_types
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package compliant_control
[rosbuild] Including /home/mk/src/ros/cturtle/ros/core/roscpp/cmake/roscpp.cmake
[rosbuild] Including /home/mk/src/ros/cturtle/ros/core/roslisp/cmake/roslisp.cmake
[rosbuild] Including /home/mk/src/ros/cturtle/ros/core/rospy/cmake/rospy.cmake
Orocos-RTT found in /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/lib/cmake/orocos-rtt/orocos-rtt-gnulinux-libraries.cmake
-- Found orocos-rtt for the gnulinux target. Available transports: mqueue
Building component compliant_control in library compliant_control-gnulinux
Building typekit library compliant_control_typekit
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mk/src/git/orocos/compliant_control/build
cd build && make -j5
make[1]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[2]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
[ 66%] [ 66%] Built target compliant_control
Building CXX object CMakeFiles/compliant_control_typekit.dir/types/compliant_control-typeinfo.cpp.o
In file included from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:4:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp: In member function ‘boost::intrusive_ptr<RTT::base::DataSourceBase> RTT::types::CArrayTypeInfo<T, has_ostream>::getMember(boost::intrusive_ptr<RTT::base::DataSourceBase>, const std::string&) const [with T = double, bool has_ostream = false]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:82: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<double>]()->RTT::internal::DataSource<T>::rvalue [with T = double]()’, which is of non-class type ‘const double’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:94: error: request for member ‘address’ in ‘adata.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::AssignableDataSource<double>]()->RTT::internal::AssignableDataSource<T>::set [with T = double]()’, which is of non-class type ‘double’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:94: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<double>]()->RTT::internal::DataSource<T>::rvalue [with T = double]()’, which is of non-class type ‘const double’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:94: error: ‘double’ is not a class, struct, or union type
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp: In member function ‘boost::intrusive_ptr<RTT::base::DataSourceBase> RTT::types::CArrayTypeInfo<T, has_ostream>::getMember(boost::intrusive_ptr<RTT::base::DataSourceBase>, boost::intrusive_ptr<RTT::base::DataSourceBase>) const [with T = double, bool has_ostream = false]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:113: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<double>]()->RTT::internal::DataSource<T>::rvalue [with T = double]()’, which is of non-class type ‘const double’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:128: error: request for member ‘address’ in ‘adata.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::AssignableDataSource<double>]()->RTT::internal::AssignableDataSource<T>::set [with T = double]()’, which is of non-class type ‘double’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:128: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<double>]()->RTT::internal::DataSource<T>::rvalue [with T = double]()’, which is of non-class type ‘const double’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:128: error: ‘double’ is not a class, struct, or union type
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp: In member function ‘boost::intrusive_ptr<RTT::base::DataSourceBase> RTT::types::CArrayTypeInfo<T, has_ostream>::getMember(boost::intrusive_ptr<RTT::base::DataSourceBase>, const std::string&) const [with T = bool, bool has_ostream = false]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:82: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<bool>]()->RTT::internal::DataSource<T>::rvalue [with T = bool]()’, which is of non-class type ‘const bool’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:94: error: request for member ‘address’ in ‘adata.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::AssignableDataSource<bool>]()->RTT::internal::AssignableDataSource<T>::set [with T = bool]()’, which is of non-class type ‘bool’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:94: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<bool>]()->RTT::internal::DataSource<T>::rvalue [with T = bool]()’, which is of non-class type ‘const bool’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:94: error: ‘bool’ is not a class, struct, or union type
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp: In member function ‘boost::intrusive_ptr<RTT::base::DataSourceBase> RTT::types::CArrayTypeInfo<T, has_ostream>::getMember(boost::intrusive_ptr<RTT::base::DataSourceBase>, boost::intrusive_ptr<RTT::base::DataSourceBase>) const [with T = bool, bool has_ostream = false]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:113: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<bool>]()->RTT::internal::DataSource<T>::rvalue [with T = bool]()’, which is of non-class type ‘const bool’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:128: error: request for member ‘address’ in ‘adata.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::AssignableDataSource<bool>]()->RTT::internal::AssignableDataSource<T>::set [with T = bool]()’, which is of non-class type ‘bool’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:128: error: request for member ‘count’ in ‘data.boost::intrusive_ptr<T>::operator-> [with T = RTT::internal::DataSource<bool>]()->RTT::internal::DataSource<T>::rvalue [with T = bool]()’, which is of non-class type ‘const bool’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/CArrayTypeInfo.hpp:128: error: ‘bool’ is not a class, struct, or union type
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:44,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp: At global scope:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp: In instantiation of ‘RTT::internal::DataSource<bool [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:165: instantiated from ‘RTT::internal::AssignableDataSource<bool [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:64: instantiated from ‘RTT::internal::PartDataSource<bool [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:16: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:109: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:114: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In instantiation of ‘RTT::internal::PartDataSource<bool [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:16: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:86: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:91: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp: In instantiation of ‘RTT::internal::AliasDataSource<bool [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:253: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:16: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:276: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:281: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:44,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp: In instantiation of ‘RTT::internal::DataSource<double [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:165: instantiated from ‘RTT::internal::AssignableDataSource<double [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:64: instantiated from ‘RTT::internal::PartDataSource<double [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:17: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:109: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:114: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In instantiation of ‘RTT::internal::PartDataSource<double [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:17: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:86: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:91: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp: In instantiation of ‘RTT::internal::AliasDataSource<double [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:253: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:17: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:276: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:281: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::DataSource<T>::evaluate() const [with T = double [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:54: error: ‘const class RTT::internal::DataSource<double [6]>’ has no member named ‘get’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::AssignableDataSource<T>::update(RTT::base::DataSourceBase*) [with T = double [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:86: error: ‘class RTT::internal::DataSource<double [6]>’ has no member named ‘value’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In member function ‘void RTT::internal::PartDataSource<T>::set(typename RTT::internal::AssignableDataSource<T>::param_t) [with T = double [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:98: error: incompatible types in assignment of ‘const double* const’ to ‘double [6]’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::DataSource<T>::evaluate() const [with T = bool [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:54: error: ‘const class RTT::internal::DataSource<bool [6]>’ has no member named ‘get’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::AssignableDataSource<T>::update(RTT::base::DataSourceBase*) [with T = bool [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:86: error: ‘class RTT::internal::DataSource<bool [6]>’ has no member named ‘value’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In member function ‘void RTT::internal::PartDataSource<T>::set(typename RTT::internal::AssignableDataSource<T>::param_t) [with T = bool [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:35: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:98: error: incompatible types in assignment of ‘const bool* const’ to ‘bool [6]’
make[3]: *** [CMakeFiles/compliant_control_typekit.dir/types/compliant_control-typeinfo.cpp.o] Error 1
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make[2]: *** [CMakeFiles/compliant_control_typekit.dir/all] Error 2
make[2]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make: *** [all] Error 2
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
problem with CArrayType
On Monday 06 December 2010 13:28:48 Markus Klotzbuecher wrote:
> Dear List,
>
> I am trying to write a typekit for the following type:
>
> # compliant_control-types.hpp
> struct MotionSpec
> {
> bool control_types[6];
> double desired_vals[6];
> };
>
>
> My code is the following:
>
> #include <rtt/types/SequenceTypeInfo.hp
> #include <rtt/types/StructTypeInfo.hp
> #include <rtt/types/CArrayTypeInfo.hp
> #include <rtt/types/BoostArrayTypeInfo.hp
>
> #include "../compliant_control-types.hpp"
>
> using namespace RTT::types;
>
> namespace boost {
> namespace serialization {
> template <class Archive>
> void serialize ( Archive & a, MotionSpec & ms, unsigned int) {
> using boost::serialization::make_nvp;
> a & make_nvp("control_types", ms.control_types);
> a & make_nvp("desired_vals", ms.desired_vals);
> }
> }
> }
>
> struct MotionSpecTypeInfo
>
> : public RTT::types::StructTypeInfo<MotionSpec>
>
> {
> MotionSpecTypeInfo()
>
> : RTT::types::StructTypeInfo<MotionSpec>("MotionSpec")
>
> {}
> };
>
> void load_motion_spec_types()
> {
> RTT::types::Types()->addType( new CArrayTypeInfo<bool>("bool[]") );
> RTT::types::Types()->addType( new CArrayTypeInfo<double>("double[]") );
> RTT::types::Types()->addType( new MotionSpecTypeInfo);
> }
>
>
> It works when I change the two CArrays into std::vectors, but I'd like
> to fix the size to 6. From reading the docs (2.1.1. Struct versus
> Sequence), see "unsigned int timestamp[2];" example it appears this
> should work by using CArrayTypeInfo.
It's a bug in the manual, you need to write:
RTT::types::Types()->addType( new CArrayTypeInfo< carray<bool> >("bool[]") );
RTT::types::Types()->addType( new CArrayTypeInfo< carray<double> >("double[]")
);
the carray type is defined by the RTT::internal namespace. We should probably
move it into RTT::types.
Peter
problem with CArrayType
On Monday 06 December 2010 17:10:07 Peter Soetens wrote:
> On Monday 06 December 2010 13:28:48 Markus Klotzbuecher wrote:
> > Dear List,
> >
> > I am trying to write a typekit for the following type:
> >
> > # compliant_control-types.hpp
> > struct MotionSpec
> > {
> >
> > bool control_types[6];
> >
> > double desired_vals[6];
> >
> > };
> >
> >
> > My code is the following:
> >
> > #include <rtt/types/SequenceTypeInfo.hp
> > #include <rtt/types/StructTypeInfo.hp
> > #include <rtt/types/CArrayTypeInfo.hp
> > #include <rtt/types/BoostArrayTypeInfo.hp
> >
> > #include "../compliant_control-types.hpp"
> >
> > using namespace RTT::types;
> >
> > namespace boost {
> >
> > namespace serialization {
> >
> > template <class Archive>
> > void serialize ( Archive & a, MotionSpec & ms, unsigned int) {
> >
> > using boost::serialization::make_nvp;
> > a & make_nvp("control_types", ms.control_types);
> > a & make_nvp("desired_vals", ms.desired_vals);
> >
> > }
> >
> > }
> >
> > }
> >
> > struct MotionSpecTypeInfo
> >
> > : public RTT::types::StructTypeInfo<MotionSpec>
> >
> > {
> >
> > MotionSpecTypeInfo()
> >
> > : RTT::types::StructTypeInfo<MotionSpec>("MotionSpec")
> >
> > {}
> >
> > };
> >
> > void load_motion_spec_types()
> > {
> >
> > RTT::types::Types()->addType( new CArrayTypeInfo<bool>("bool[]") );
> > RTT::types::Types()->addType( new CArrayTypeInfo<double>("double[]") );
> > RTT::types::Types()->addType( new MotionSpecTypeInfo);
> >
> > }
> >
> >
> > It works when I change the two CArrays into std::vectors, but I'd like
> > to fix the size to 6. From reading the docs (2.1.1. Struct versus
> > Sequence), see "unsigned int timestamp[2];" example it appears this
> > should work by using CArrayTypeInfo.
>
> It's a bug in the manual, you need to write:
>
> RTT::types::Types()->addType( new CArrayTypeInfo< carray<bool> >("bool[]")
> ); RTT::types::Types()->addType( new CArrayTypeInfo< carray<double>
> >("double[]") );
The doxygen docs of CArrayTypeInfo were containing this info though...
>
> the carray type is defined by the RTT::internal namespace. We should
> probably move it into RTT::types.
I have moved it into RTT::types and updated the documentation. I added a
backwards-compatibility header in internal in order not to break anything 2
days before release. I believe orogen is using 'carray' as well in some
places. All code should switch by when 2.3 is released though.
Peter
problem with CArrayType
On Mon, Dec 06, 2010 at 05:32:36PM +0100, Peter Soetens wrote:
> On Monday 06 December 2010 17:10:07 Peter Soetens wrote:
> > On Monday 06 December 2010 13:28:48 Markus Klotzbuecher wrote:
> > > Dear List,
> > >
> > > I am trying to write a typekit for the following type:
> > >
> > > # compliant_control-types.hpp
> > > struct MotionSpec
> > > {
> > >
> > > bool control_types[6];
> > >
> > > double desired_vals[6];
> > >
> > > };
> > >
> > >
> > > My code is the following:
> > >
> > > #include <rtt/types/SequenceTypeInfo.hp
> > > #include <rtt/types/StructTypeInfo.hp
> > > #include <rtt/types/CArrayTypeInfo.hp
> > > #include <rtt/types/BoostArrayTypeInfo.hp
> > >
> > > #include "../compliant_control-types.hpp"
> > >
> > > using namespace RTT::types;
> > >
> > > namespace boost {
> > >
> > > namespace serialization {
> > >
> > > template <class Archive>
> > > void serialize ( Archive & a, MotionSpec & ms, unsigned int) {
> > >
> > > using boost::serialization::make_nvp;
> > > a & make_nvp("control_types", ms.control_types);
> > > a & make_nvp("desired_vals", ms.desired_vals);
> > >
> > > }
> > >
> > > }
> > >
> > > }
> > >
> > > struct MotionSpecTypeInfo
> > >
> > > : public RTT::types::StructTypeInfo<MotionSpec>
> > >
> > > {
> > >
> > > MotionSpecTypeInfo()
> > >
> > > : RTT::types::StructTypeInfo<MotionSpec>("MotionSpec")
> > >
> > > {}
> > >
> > > };
> > >
> > > void load_motion_spec_types()
> > > {
> > >
> > > RTT::types::Types()->addType( new CArrayTypeInfo<bool>("bool[]") );
> > > RTT::types::Types()->addType( new CArrayTypeInfo<double>("double[]") );
> > > RTT::types::Types()->addType( new MotionSpecTypeInfo);
> > >
> > > }
> > >
> > >
> > > It works when I change the two CArrays into std::vectors, but I'd like
> > > to fix the size to 6. From reading the docs (2.1.1. Struct versus
> > > Sequence), see "unsigned int timestamp[2];" example it appears this
> > > should work by using CArrayTypeInfo.
> >
> > It's a bug in the manual, you need to write:
> >
> > RTT::types::Types()->addType( new CArrayTypeInfo< carray<bool> >("bool[]")
> > ); RTT::types::Types()->addType( new CArrayTypeInfo< carray<double>
> > >("double[]") );
I added the following
RTT::types::Types()->addType( new CArrayTypeInfo< RTT::internal::carray<bool> >("bool[]") );
RTT::types::Types()->addType( new CArrayTypeInfo< RTT::internal::carray<double> >("double[]") );
but now I get the attached error.
> The doxygen docs of CArrayTypeInfo were containing this info though...
I was looking here:
http://orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-typekit-p...
scroll down to the complete example.
Markus
mkdir -p bin
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package compliant_control
[rosbuild] Including /home/mk/src/ros/cturtle/ros/core/roscpp/cmake/roscpp.cmake
[rosbuild] Including /home/mk/src/ros/cturtle/ros/core/roslisp/cmake/roslisp.cmake
[rosbuild] Including /home/mk/src/ros/cturtle/ros/core/rospy/cmake/rospy.cmake
Orocos-RTT found in /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/lib/cmake/orocos-rtt/orocos-rtt-gnulinux-libraries.cmake
-- Found orocos-rtt for the gnulinux target. Available transports: mqueue
Building component compliant_control in library compliant_control-gnulinux
Building typekit library compliant_control_typekit
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mk/src/git/orocos/compliant_control/build
cd build && make -j5
make[1]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[2]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
[ 33%] Scanning dependencies of target compliant_control
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
Building CXX object CMakeFiles/compliant_control_typekit.dir/types/compliant_control-typeinfo.cpp.o
make[3]: Entering directory `/home/mk/src/git/orocos/compliant_control/build'
[ 66%] Building CXX object CMakeFiles/compliant_control.dir/CompliantController.cpp.o
Linking CXX shared library ../lib/orocos/libcompliant_control-gnulinux.so
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
[ 66%] Built target compliant_control
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:44,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp: In instantiation of ‘RTT::internal::DataSource<bool [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:165: instantiated from ‘RTT::internal::AssignableDataSource<bool [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:64: instantiated from ‘RTT::internal::PartDataSource<bool [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:16: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:109: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:114: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In instantiation of ‘RTT::internal::PartDataSource<bool [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:16: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:86: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:91: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp: In instantiation of ‘RTT::internal::AliasDataSource<bool [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:253: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = bool [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<bool [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:16: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:276: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:281: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:44,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp: In instantiation of ‘RTT::internal::DataSource<double [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:165: instantiated from ‘RTT::internal::AssignableDataSource<double [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:64: instantiated from ‘RTT::internal::PartDataSource<double [6]>’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:17: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:109: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.hpp:114: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In instantiation of ‘RTT::internal::PartDataSource<double [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:252: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:17: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:86: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:91: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp: In instantiation of ‘RTT::internal::AliasDataSource<double [6]>’:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:253: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(T&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:297: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::load_a_type(const boost::serialization::nvp<T>&, mpl_::false_) [with T = double [6]]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:213: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator>>(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:224: instantiated from ‘RTT::types::type_discovery& RTT::types::type_discovery::operator&(T&) [with T = const boost::serialization::nvp<double [6]>]’
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:17: instantiated from ‘void boost::serialization::serialize(Archive&, MotionSpec&, unsigned int) [with Archive = RTT::types::type_discovery]’
/usr/include/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = RTT::types::type_discovery, T = MotionSpec]’
/usr/include/boost/archive/detail/iserializer.hpp:367: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_only::invoke(Archive&, const T&) [with T = MotionSpec, Archive = RTT::types::type_discovery]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:162: instantiated from ‘void RTT::types::type_discovery::discover(T&) [with T = MotionSpec]’
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/StructTypeInfo.hpp:72: instantiated from ‘std::vector<std::basic_string
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:276: error: function returning an array
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:281: error: function returning an array
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::DataSource<T>::evaluate() const [with T = double [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:54: error: ‘const class RTT::internal::DataSource<double [6]>’ has no member named ‘get’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::AssignableDataSource<T>::update(RTT::base::DataSourceBase*) [with T = double [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:86: error: ‘class RTT::internal::DataSource<double [6]>’ has no member named ‘value’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In member function ‘void RTT::internal::PartDataSource<T>::set(typename RTT::internal::AssignableDataSource<T>::param_t) [with T = double [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:98: error: incompatible types in assignment of ‘const double* const’ to ‘double [6]’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::DataSource<T>::evaluate() const [with T = bool [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:54: error: ‘const class RTT::internal::DataSource<bool [6]>’ has no member named ‘get’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.inl:6,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSources.hpp:784,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../Property.hpp:45,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/TemplateTypeInfo.hpp:43,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:43,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl: In member function ‘bool RTT::internal::AssignableDataSource<T>::update(RTT::base::DataSourceBase*) [with T = bool [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/DataSource.inl:86: error: ‘class RTT::internal::DataSource<bool [6]>’ has no member named ‘value’
In file included from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/type_discovery.hpp:81,
from /home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/SequenceTypeInfo.hpp:44,
from /home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:2:
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp: In member function ‘void RTT::internal::PartDataSource<T>::set(typename RTT::internal::AssignableDataSource<T>::param_t) [with T = bool [6]]’:
/home/mk/src/git/orocos/compliant_control/types/compliant_control-typeinfo.cpp:37: instantiated from here
/home/mk/src/git/kul/kul-ros-pkg/stacks/orocos_toolchain_ros/rtt/install/include/rtt/types/../internal/PartDataSource.hpp:98: error: incompatible types in assignment of ‘const bool* const’ to ‘bool [6]’
make[3]: *** [CMakeFiles/compliant_control_typekit.dir/types/compliant_control-typeinfo.cpp.o] Error 1
make[3]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make[2]: *** [CMakeFiles/compliant_control_typekit.dir/all] Error 2
make[2]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/mk/src/git/orocos/compliant_control/build'
make: *** [all] Error 2
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
problem with CArrayType
On Tuesday 07 December 2010 10:26:03 Markus Klotzbuecher wrote:
> On Mon, Dec 06, 2010 at 05:32:36PM +0100, Peter Soetens wrote:
> > On Monday 06 December 2010 17:10:07 Peter Soetens wrote:
> > > On Monday 06 December 2010 13:28:48 Markus Klotzbuecher wrote:
> > > > Dear List,
> > > >
> > > > I am trying to write a typekit for the following type:
> > > >
> > > > # compliant_control-types.hpp
> > > > struct MotionSpec
> > > > {
> > > >
> > > > bool control_types[6];
> > > >
> > > > double desired_vals[6];
> > > >
> > > > };
> > > >
> > > >
> > > > My code is the following:
> > > >
> > > > #include <rtt/types/SequenceTypeInfo.hp
> > > > #include <rtt/types/StructTypeInfo.hp
> > > > #include <rtt/types/CArrayTypeInfo.hp
> > > > #include <rtt/types/BoostArrayTypeInfo.hp
> > > >
> > > > #include "../compliant_control-types.hpp"
> > > >
> > > > using namespace RTT::types;
> > > >
> > > > namespace boost {
> > > >
> > > > namespace serialization {
> > > >
> > > > template <class Archive>
> > > > void serialize ( Archive & a, MotionSpec & ms, unsigned int) {
> > > >
> > > > using boost::serialization::make_nvp;
> > > > a & make_nvp("control_types", ms.control_types);
> > > > a & make_nvp("desired_vals", ms.desired_vals);
> > > >
> > > > }
The serialization function is wrong too :-]. In case of doubt, consult the
boost::serialization manual. You need to write:
...
> > >
> > > It's a bug in the manual, you need to write:
> > >
> > > RTT::types::Types()->addType( new CArrayTypeInfo< carray<bool>
> > > >("bool[]") ); RTT::types::Types()->addType( new CArrayTypeInfo<
> > > carray<double>
> > >
> > > >("double[]") );
>
> I added the following
>
> RTT::types::Types()->addType( new CArrayTypeInfo<
> RTT::internal::carray<bool> >("bool[]") ); RTT::types::Types()->addType(
> new CArrayTypeInfo< RTT::internal::carray<double> >("double[]") );
>
> but now I get the attached error.
>
> > The doxygen docs of CArrayTypeInfo were containing this info though...
>
> I was looking here:
>
> http://orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-typekit-plug
> in.html#id452962
>
> scroll down to the complete example.
I know, I have fixed the docs for the next release. Sorry for all that.
Peter
problem with CArrayType
On Tue, Dec 07, 2010 at 10:55:13AM +0100, Peter Soetens wrote:
> On Tuesday 07 December 2010 10:26:03 Markus Klotzbuecher wrote:
> > On Mon, Dec 06, 2010 at 05:32:36PM +0100, Peter Soetens wrote:
> > > On Monday 06 December 2010 17:10:07 Peter Soetens wrote:
> > > > On Monday 06 December 2010 13:28:48 Markus Klotzbuecher wrote:
> > > > > Dear List,
> > > > >
> > > > > I am trying to write a typekit for the following type:
> > > > >
> > > > > # compliant_control-types.hpp
> > > > > struct MotionSpec
> > > > > {
> > > > >
> > > > > bool control_types[6];
> > > > >
> > > > > double desired_vals[6];
> > > > >
> > > > > };
> > > > >
> > > > >
> > > > > My code is the following:
> > > > >
> > > > > #include <rtt/types/SequenceTypeInfo.hp
> > > > > #include <rtt/types/StructTypeInfo.hp
> > > > > #include <rtt/types/CArrayTypeInfo.hp
> > > > > #include <rtt/types/BoostArrayTypeInfo.hp
> > > > >
> > > > > #include "../compliant_control-types.hpp"
> > > > >
> > > > > using namespace RTT::types;
> > > > >
> > > > > namespace boost {
> > > > >
> > > > > namespace serialization {
> > > > >
> > > > > template <class Archive>
> > > > > void serialize ( Archive & a, MotionSpec & ms, unsigned int) {
> > > > >
> > > > > using boost::serialization::make_nvp;
> > > > > a & make_nvp("control_types", ms.control_types);
> > > > > a & make_nvp("desired_vals", ms.desired_vals);
> > > > >
> > > > > }
>
> The serialization function is wrong too :-]. In case of doubt, consult the
> boost::serialization manual. You need to write:
>
>
>
> ...
> > > >
> > > > It's a bug in the manual, you need to write:
> > > >
> > > > RTT::types::Types()->addType( new CArrayTypeInfo< carray<bool>
> > > > >("bool[]") ); RTT::types::Types()->addType( new CArrayTypeInfo<
> > > > carray<double>
> > > >
> > > > >("double[]") );
> >
> > I added the following
> >
> > RTT::types::Types()->addType( new CArrayTypeInfo<
> > RTT::internal::carray<bool> >("bool[]") ); RTT::types::Types()->addType(
> > new CArrayTypeInfo< RTT::internal::carray<double> >("double[]") );
> >
> > but now I get the attached error.
> >
> > > The doxygen docs of CArrayTypeInfo were containing this info though...
> >
> > I was looking here:
> >
> > http://orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-typekit-plug
> > in.html#id452962
> >
> > scroll down to the complete example.
>
> I know, I have fixed the docs for the next release. Sorry for all that.
No problem. It's working now.
Thanks!
Markus
problem with CArrayType
On Mon, Dec 06, 2010 at 01:28:48PM +0100, Markus Klotzbuecher wrote:
> Dear List,
>
> I am trying to write a typekit for the following type:
>
> # compliant_control-types.hpp
> struct MotionSpec
> {
> bool control_types[6];
> double desired_vals[6];
> };
>
>
> My code is the following:
>
> #include <rtt/types/SequenceTypeInfo.hp
> #include <rtt/types/StructTypeInfo.hp
> #include <rtt/types/CArrayTypeInfo.hp
> #include <rtt/types/BoostArrayTypeInfo.hp
>
> #include "../compliant_control-types.hpp"
>
> using namespace RTT::types;
>
> namespace boost {
> namespace serialization {
> template <class Archive>
> void serialize ( Archive & a, MotionSpec & ms, unsigned int) {
> using boost::serialization::make_nvp;
> a & make_nvp("control_types", ms.control_types);
> a & make_nvp("desired_vals", ms.desired_vals);
> }
> }
> }
>
> struct MotionSpecTypeInfo
> : public RTT::types::StructTypeInfo<MotionSpec>
> {
> MotionSpecTypeInfo()
> : RTT::types::StructTypeInfo<MotionSpec>("MotionSpec")
> {}
> };
>
> void load_motion_spec_types()
> {
> RTT::types::Types()->addType( new CArrayTypeInfo<bool>("bool[]") );
> RTT::types::Types()->addType( new CArrayTypeInfo<double>("double[]") );
> RTT::types::Types()->addType( new MotionSpecTypeInfo);
> }
>
>
> It works when I change the two CArrays into std::vectors, but I'd like
> to fix the size to 6. From reading the docs (2.1.1. Struct versus
> Sequence), see "unsigned int timestamp[2];" example it appears this
> should work by using CArrayTypeInfo.
>
> The error follows below.
I forgot to mention:
debian testing/unstable mix
libboost-* 1.42.0-4
Markus