Setting frame_id for simros_strmcmd_get_object_pose?

Typically: "How do I... ", "How can I... " questions
Post Reply
manip
Posts: 10
Joined: 14 Oct 2015, 11:27

Setting frame_id for simros_strmcmd_get_object_pose?

Post by manip »

Hello,

I am trying to make V-REP to publish geometry_msgs::PoseStamped message and visualize it in RViz. The problem is that this message doesn't specify its header.frame_id, so RViz cannot transform and display it.
More specifically, I am using simRosEnablePublisher service from the ROS node side with simros_strmcmd_get_object_pose as streamCmd argument, and the published message contains proper object pose data except empty header.frame_id field.
Is there any way to specify frame_id? If not, it would be great if we can set this field when enabling the publisher (maybe using auxString?).

Thanks.

manip
Posts: 10
Joined: 14 Oct 2015, 11:27

Re: Setting frame_id for simros_strmcmd_get_object_pose?

Post by manip »

For the moment, I see that a little hack to vrep_plugin/src/ROS_server.cpp can be a workaround, by adding the following at line 1315:

Code: Select all

    fl.header.frame_id=publishers[pubI].auxStr;

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Setting frame_id for simros_strmcmd_get_object_pose?

Post by coppelia »

Hello,

yes, that's the correct way of doing it. Thanks for mentioning this.

Cheers

Post Reply