error when I try to read a ros msg composite by another msg file into a node subscriber calback
Error when I try to read a ros msg composite by another msg file into a node subscriber callback.
I have this ROS msgs.
WalkingRequest.msg
uint32 mode #/**< The walking mode. */
Pose2D speed
Pose2D target
Pose2D.msg
float32 theta
float32 x
float32 y
Within the callback of my suscriber node I use:
void myCallBack(const naoros1::WalkRequest::ConstPtr& walkRequest_)
{
walkRequest.mode = walkRequest_->mode;
Which works fine. But when I try to access to the embedded Pose2D msg like that:
walkRequest.speed.x = walkRequest_->speed->x;
I have this error:
/home/nao/ros-nao/workspace_nao/sandbox/naoros1/src/src/UChProcess/UChCognitionExecutor.cpp: In member function ‘void UChCognitionExecutor::runModules(const boost::shared_ptr<const naoros1::WalkRequest_<std::allocator<void> > >&)’:
/home/nao/ros-nao/workspace_nao/sandbox/naoros1/src/src/UChProcess/UChCognitionExecutor.cpp:47: error: base operand of ‘->’ has non-pointer type ‘const naoros1::Pose2D_<std::allocator<void> >’
Thanks