Passing msg data from Python to C++
Hey,
I have a topic written in Python, inside that workspace I have two message files:
Msg1
Header header
geometry_msgs/Vector3 direction
geometry_msgs/Vector3 normal
geometry_msgs/Point palmpos
geometry_msgs/Vector3 ypr
Msg2
Header header
float64[3] hand_direction
float64[3] hand_normal
float64[3] hand_palm_pos
float64 hand_pitch
float64 hand_roll
float64 hand_yaw
If I therefore do: std_msgs/Header header
I get the information. The problem being is that now I'm using C++ to write another topic to subscribe to this. I don't know what to put inside of the callback
function, for example:
void callback(const [here]& msg)
{
}
Since when I'm using the Point2Cloud
I can use the following:
void callback(const sensor_msgs::PointCloud2Ptr& msg)
{
// Blah
}
COuld anyone please tell me what I should therefore use?
Have you tried your_package::Msg1Ptr?
Why do you have two different messages that seem to contain the same data?