0
$\begingroup$

Rosanswers logo

I have come across this question using the static_transform_publisher from the bash, but this is inconvinient. The arguments seem to offer this but cannot find an example what args -f acutally takes

  pc~/catkin_ws$ rviz -h
[ INFO] [1461508601.744858346]: rviz version 1.11.8
[ INFO] [1461508601.744970393]: compiled against OGRE version 1.8.1 (Byatis)
rviz command line options:
  -h [ --help ]               Produce this help message
  -s [ --splash-screen ] arg  A custom splash-screen image to display
  --help-file arg             A custom html file to show as the help screen
  -d [ --display-config ] arg A display config file (.rviz) to load
  -f [ --fixed-frame ] arg    Set the fixed frame

Could someone post an example for example this frame (no trans, no rot)

rosrun tf static_transform_publisher 0 0 0 0 0 0 1 map my_frame 10

EDIT So what I do is using a launch file to pack both commands together:

<launch>
<!-- set up the cosys -->
 <node pkg="tf" type="static_transform_publisher" name="map2frame_0" 
    args="0.0 0.0 0.0 0 0 0 1 map frame_0 100" />
<!-- start rviz -->
  <node pkg="rviz" type="rviz" name="my_rviz" 
    args="-d $(find rviz_markers)/include/rviz_config.rviz"/>
</launch>

Originally posted by user23fj239 on ROS Answers with karma: 748 on 2016-04-24

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You would run RViz like this: rosrun rviz rviz -f my_frame

This will set the Fixed Frame to my_frame under Global Options. You can also do that from the GUI btw.


Originally posted by spmaniato with karma: 1788 on 2016-04-24

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by user23fj239 on 2016-04-24:
what a pitty, so i cant get around publishing the my_frame. Do you know how to specify a path when using a launch file for the config, eg:

Comment by spmaniato on 2016-04-24:
If my_frame already exists, then you don't need the static transform publisher anymore. By setting the fixed frame to my_frame, RViz will visualize everything relative to my_frame instead of map, which is the default fixed frame.

$\endgroup$

Your Answer

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