0
$\begingroup$

Rosanswers logo

Hello everyone, I am trying to simulate IMU sensor using this IMU plugin in V-REP and visualize results in rviz. https://github.com/bartville/vrep_plugin_imu

But I get following error in rviz:

Invalid argument passed to canTransform argument source_frame in tf2 frame_ids cannot be empty

I think frame_id: ' ' which is empty, is a problem but I don't know how to set it in V-REP or rviz.

Please somebody help, I completely do not understand what is wrong...


Originally posted by BuxBleed on ROS Answers with karma: 3 on 2018-08-05

Post score: 0


Original comments

Comment by gvdhoorn on 2018-08-05:
I'm sorry, but you're question does not follow the support guidelines. Please review them, especially the sections about not posting screenshots of console output. If you want to update it to remove the images, let me know and I'll re-open it.

Comment by BuxBleed on 2018-08-05:
Ok I updated post

Comment by gvdhoorn on 2018-08-05:
I would suggest to also show the IMU message as the frame_id field of the header is empty, which seems very much related (or could be a red herring).

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Looking at the code for the IMU vrep plugin I don't see it setting the frame_id field. That is most likely the cause here.


Edit:

But how is the function or class property name to set frame_id for given String ?

I'm not sure what you're asking, but to set a proper frame id:

fl.header.frame_id = "<insert some frame name here>"

Edit2: I'm not a VREP user, but the warning shown here sounds like something to pay attention to:

// Quaternion code added
// But It's not from IMU Sensor but from V-Rep simGetObjectQuaternion() Function
// BE CAREFULL When you use it

Originally posted by gvdhoorn with karma: 86574 on 2018-08-05

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by BuxBleed on 2018-08-05:
But how is the function or class property name to set frame_id for given String ?

Comment by BuxBleed on 2018-08-05:
Thanks ! That's what I meant.

Comment by BuxBleed on 2018-08-05:
Thank You very much. That was the problem. Everything works now.

Comment by gvdhoorn on 2018-08-05:
It would be very nice if you could submit a pull request against bartville/vrep_plugin_imu that contributs your fix. Future users would then not run into this issue and you'd save them some time (and possibly frustration).

Comment by gvdhoorn on 2018-08-12:
Issue: bartville/vrep_plugin_imu#2.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.