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

Doubt about rviz and change of Object types

asked 2012-04-18 04:59:18 -0500

alonsosjumper gravatar image

updated 2014-01-28 17:12:00 -0500

ngrennan gravatar image

Hello, i've this launch to run rviz:

<launch> <node pkg="rviz" type="rviz" name="rviz" args="-d $(find ar_pose)/launch/live_single.vcg"/>

<node pkg="tf" type="static_transform_publisher" name="world_to_cam" 
    args="0 0 0.5 -1.57 0 -1.57 world usb_cam 10" />

<node name="usb_cam" pkg="usb_cam" type="usb_cam_node" respawn="false" output="log">
    <param name="video_device" type="string" value="/dev/video1"/>
    <param name="camera_frame_id" type="string" value="usb_cam"/>
    <param name="io_method" type="string" value="mmap"/>
    <param name="image_width" type="int" value="640"/>
    <param name="image_height" type="int" value="480"/>
    <param name="pixel_format" type="string" value="yuyv"/>
    <rosparam param="D">[0.025751483065329935, -0.10530741936574876,-0.0024821434601277623, -0.0031632353637182972, 0.0000]</rosparam>
    <rosparam param="K">[558.70655574536931, 0.0, 316.68428342491319, 0.0, 553.44501004322387, 238.23867473419315, 0.0, 0.0, 1.0]</rosparam>
    <rosparam param="R">[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]</rosparam>
    <rosparam param="P">[558.70655574536931, 0.0, 316.68428342491319, 0.0, 0.0, 553.44501004322387, 238.23867473419315, 0.0, 0.0, 0.0, 1.0, 0.0]</rosparam>

<node name="ar_pose" pkg="ar_pose" type="ar_single" respawn="false" output="screen">
    <param name="marker_pattern" type="string" value="$(find ar_pose)/data/patt.hiro"/>
    <param name="marker_width" type="double" value="80.0"/>
    <param name="marker_center_x" type="double" value="0.0"/>
    <param name="marker_center_y" type="double" value="0.0"/>
    <param name="threshold" type="int" value="100"/>
    <param name="use_history" type="bool" value="true"/>

</node> </launch>

With this launch, i run rviz with 4 displays which are default in live_single.vcg.

Background\ ColorR=0 Background\ ColorG=0 Background\ ColorB=0 Fixed\ Frame=/world Target\ Frame=<fixed frame=""> Camera.Alpha=0.5 Camera.Enabled=1 Camera.Image\ Topic=/usb_cam/image_raw Grid.Alpha=0.5 Grid.Cell\ Size=1 Grid.ColorR=0.654902 Grid.ColorG=0 Grid.ColorB=0 Grid.Enabled=1 Grid.Line\ Style=0 Grid.Line\ Width=0.03 Grid.Normal\ Cell\ Count=0 Grid.OffsetX=0 Grid.OffsetY=0 Grid.OffsetZ=0 Grid.Plane=0 Grid.Plane\ Cell\ Count=10 Grid.Reference\ Frame=<fixed frame=""> Markers.Enabled=1 Markers.Marker\ Topic=visualization_marker Markers.basic_shapes=1 TF.All\ Enabled=1 TF.Enabled=1 TF.Show\ Arrows=1 TF.Show\ Axes=1 TF.Show\ Names=1 TF.Update\ Rate=0 Tool\ 2D\ Nav\ GoalTopic=goal Tool\ 2D\ Pose\ EstimateTopic=initialpose Camera\ Type=rviz::OrbitViewController Camera\ Config=1.07693 0.461088 5.5806 0 0 0 Property\ Grid\ State=selection=Target Frame;expanded=.Global Options,TF./ar_marker/ar_marker,TF./usb_cam/usb_cam,TF./ar_markerTree/ar_marker,TF./usb_camTree/usb_cam,Markers.Enabled.Markers.StatusTopStatus,Markers.Enabled.Markers.Namespaces;scrollpos=0,0;splitterpos=133,266;ispageselected=1 [Display0] Name=TF Package=rviz ClassName=rviz::TFDisplay [Display1] Name=Markers Package=rviz ClassName=rviz::MarkerDisplay [Display2] Name=Camera Package=rviz ClassName=rviz::CameraDisplay [Display3] Name=Grid Package=rviz ClassName=rviz::GridDisplay [TF.] ar_markerEnabled=1 usb_camEnabled=1

However, it runs represented by arrows (1.3.1 of the next url)

I ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-04-18 20:33:50 -0500

K Chen gravatar image

updated 2012-04-18 20:36:17 -0500

Please see the API doc here and wiki here

Which comment says

#Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
geometry_msgs/Point[] points
#Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
#number of colors must either be 0 or equal to the number of points
#NOTE: alpha is not yet used
std_msgs/ColorRGBA[] colors
edit flag offensive delete link more

Question Tools


Asked: 2012-04-18 04:59:18 -0500

Seen: 351 times

Last updated: Apr 18 '12