ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
/home/krish/architecture_ws/src/rectifier/src/camera_timestamp_node.cpp:276:6: error: ‘const ImageConstPtr’ has no member named ‘mywidth’ /home/krish/architecture_ws/src/rectifier/src/camera_timestamp_node.cpp:277:6: error: ‘const ImageConstPtr’ has no member named ‘myheight’
This is a bit of a guess (as we don't have the actualy msg definition), but I'd say that your trying to access the mywidth
member variable of an ImageConstPtr
itself, not of the object it is pointing to. That probably fails, because the pointer will not have that member, only the pointed to has it.
To access the field on the pointed to, you'd probably have to dereference the ImageConstPtr
, which you would do with my_ptr->mywidth
(which uses the shorthand form of the dereference operator).