Setting a frame id
I have a problem in setting a world
frame id. I did as below, but it doesn't work. It that right what I did and where should it actually be set? I've also tried with and without (/), but, it makes no difference at the moment. The error that I suspect is, in the fixed_frame in rviz I couldn't tick for it. What more I have the following warning:
[ WARN] [1329404542.223645698]: Warning: Frame id /world does not exist! Frames (3): Frame /laser exists with parent /base_link.
Frame /base_link exists with parent NO_PARENT.
Code snippet:
void AssemblerClient::useAssembler(const sensor_msgs::LaserScanConstPtr& scan_ptr)
{
ROS_INFO("Assembler service is being used");
ros::service::waitForService("assemble_scans");
ros::ServiceClient client = n.serviceClient<AssembleScans>("assemble_scans");
AssembleScans srv;
srv.request.begin = ros::Time(0,0);
srv.request.end = ros::Time::now();
if (client.call(srv))
{
ROS_INFO("Got cloud with %u points\n", srv.response.cloud.points.size());
gathered_cloud = srv.response.cloud;
gathered_cloud.header.frame_id = "/world";
gathered_cloud_publisher_.publish(gathered_cloud);
}
else
ROS_INFO("Service call failed\n");
}
Thanks in advance.