ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can't do this.

The OS will run each process in its own memory space, and this will prevent and kind of memory-sharing between processes. Even if your program compiled and ran, it would not work; you'd either get a segmentation fault or silently corrupt memory.

Instead, you should create a custom message type for the data you're trying to pass between nodes, and transmit the entire data structure from one node to another. (This will also work even if your nodes aren't running on the same computer).