B. Missing setting of marker.header.stamp to current time
C. Scale values are too small to see
D. Color alpha is zero making it invisible
Solution
Step 1: Check marker header completeness
ROS markers require header.stamp to be set to current time for RViz to display them properly.
Step 2: Verify other parameters
Marker type, scale, and color are valid and visible; alpha is 1.0 (opaque).
Final Answer:
Missing setting of marker.header.stamp to current time -> Option B
Quick Check:
Header stamp missing = A [OK]
Hint: Always set header.stamp to ros::Time::now() [OK]
Common Mistakes:
Forgetting to set header.stamp
Using zero alpha making marker invisible
Assuming scale too small to see
5. You want to display multiple markers at different positions using a single ROS publisher. Which approach correctly updates and publishes markers to show all of them in RViz?
hard
A. Publish each marker separately with unique IDs and the same topic
B. Publish only the last marker repeatedly, ignoring others
C. Publish markers with the same ID to overwrite previous ones
D. Publish markers without setting frame_id to avoid errors
Solution
Step 1: Understand marker IDs and topics
Each marker must have a unique ID to be displayed simultaneously on the same topic.
Step 2: Avoid overwriting markers
Publishing markers with the same ID overwrites previous ones, so unique IDs are needed.
Final Answer:
Publish each marker separately with unique IDs and the same topic -> Option A
Quick Check:
Unique IDs per marker = C [OK]
Hint: Use unique IDs for each marker on one topic [OK]
Common Mistakes:
Using same ID for multiple markers
Publishing only one marker and expecting all to show