Function not accessed inside the Update() in module.
I have a part file named pDepthPart.cpp
The following code runs perfectly in the part file.
auto value=obstacle_distance->out_obstacle_distance_map.GetPointer()->IsWorldCoordinateInBounds(x,y);
But now I want this to run in the Update() function in the module file so that I get the output each time the aspect map gets changed. So the ports I define inside mDepthImageToDistanceData.h
are
public:
tInput<rrlib::aspect_maps::tGridAspectMap<float>> in_input;
tOutput<bool> out_output;
In pDepthPart.cpp
, I connect the ports as follows:
depth_image->in_input.ConnectTo(obstacle_distance->out_obstacle_distance_map);
But inside the Update function of the module, when I write
auto data= this->in_input.GetPointer().IsWorldCoordinateInBounds(9,0);
It gives error that this data type doesn't have IsWorldCoordinateInBounds
function. Sometimes it also gives error that in_input
is a non-pointer variable. So I am not sure what is the problem although both obstacle_distance->out_obstacle_distance_map
and in_input
are connected and both have same data type, but the latter doesn't have IsWorldCoordinateInBounds
function.
This is the error shown on the terminal.
sources/cpp/projects/tractor_control/mDepthImageToDistanceData.cpp: In member function ‘virtual void finroc::tractor_control::mDepthImageToDistanceData::Update()’:
sources/cpp/projects/tractor_control/mDepthImageToDistanceData.cpp:50:40: error: ‘class finroc::data_ports::tPortDataPointer\<const rrlib::aspect_maps::tGridAspectMap \>’ has no member named ‘IsWorldCoordinateInBounds’