Rosanswers logo

Hello, i've this launch to run rviz:

<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"/>

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= 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= 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 wish run as a CUBE (1). I suppose that i have to change in:

visualization_marker (visualization_msgs/Marker)

marker.type = visualization_msgs::Marker::ARROW; by marker.type = visualization_msgs::Marker::CUBE;

But i don't know where is this topic to change it.

In a few words, i wish representate my problem as a cube or other figure.

Another question. Would it possible to representate while the figure i would wish?

Thank you!

Originally posted by alonsosjumper on ROS Answers with karma: 9 on 2012-04-18

Post score: 0


1 Answer 1


Rosanswers logo

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

Originally posted by K Chen with karma: 391 on 2012-04-18

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

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