ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If you want to control when the constructor for Z
runs, you can make it a boost::shared_ptr
(even a global one) and then wait until after the ros::init()
before allocating it.
boost::shared_ptr<Z> z;
main()
{
ros::init(...);
z.reset(new Z());
...
}