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

How to move urdf model in rviz with /imu/data

asked 2022-04-23 23:40:32 -0500

questrov gravatar image

If one has /imu/data, for example bno055 and wants to move a urdf model with it in rviz what exactly is required? For example launch the husky simulator roslaunch husky_viz view_model.launch(or any urdf model) and have it move with the IMU. I'm on a ship and want to show the motion in real time. Can get the TF or Cube visualized OK but would be really cool to have a detailed model moving, especially when we hit weather. Check out nautiluslive.org for ship details.

Have tried several tutorials and github repositories but can't get there from here. Part of the issue I'm working long hours and don't have the time (or brain power) to fully understand the general tutorials, need something step by step or a beginner explanation. Preferably a tutorial specifically detailing the steps required:-/

Still plugging away at it but any help, breadcrumbs or easy button solution much appreciated...

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-04-28 09:14:13 -0500

Joe28965 gravatar image

updated 2022-05-02 01:30:05 -0500

Move how? I'm almost thinking just set up a TF tree with an odom that is based on just the IMU.

However, you're talking about a ship, so I'm guessing you don't really want the forward movement, just the angular and maybe linear z?

Maybe you could use sensor fusion to just filter out what you don't want. It's not really what sensor fusion is about (since you'd be just using it as a filter). It should still work I think.

EDIT: The way I see it, you could make a very simple URDF with a base_link and imu_link, you can also add a mesh to the URDF to create something that looks like a ship. Then get the IMU to publish its data in ROS. Finally you should be able to use something like sensor fusion to publish the odometry between the link odom and base_link and set odom as your fixed frame in RViz.

That should work, you just need to set up sensor fusion to only use the components from the IMU that you want (angular xyz and linear z).

EDIT2: Also, did you know the source code from that video is linked in the description? The guy also explains how he did it in the video.

edit flag offensive delete link more

Comments

Move in pitch, yaw roll and heave, no forward, like you say the angular and linear z. I can make a tf tree, just can’t work out how to attach the imu to it. Basically like this video

questrov gravatar image questrov  ( 2022-05-01 17:17:42 -0500 )edit

Yea, did try the source code from the video, never could get it to work. Difference I guess is the bno055 (link above) already publishes sensor fusion into ROS. I get a quaternion error in rviz from using his stuff. Basically where I'm stuck is the base_link to odom or more accurate that's the bit I haven't figured out.

Home next week so hopefully some time to sit down and figure it out...

Thanks for the advice gives me a path to head down, or more likely rabbit hole in my learning curve case:-/

questrov gravatar image questrov  ( 2022-05-02 22:30:00 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-04-23 23:40:32 -0500

Seen: 379 times

Last updated: May 02 '22