ROS: How To Display Track?

@KeithW, I give up. I thought somebody would have a tutorial on how to display Dave’s track. Can’t find one.

What I want to do:

  1. Start bagging the odom and imu topics
  2. Drive Dave (or write a program to drive Dave) in a square ending as close as I can to the starting point and heading.
  3. Visualize the track according to the odom in RViz
  4. Configure a robot_localization EKF node
  5. “Play” the recorded bag
  6. Visualize the track according to the fused odom and imu,
    ( ideally Visualize both the odom track and the EKF track at the same time.)

Can you tell me what I have to do to display a track?

(I already have a program in python using the EasyGoPiGo3 drive_cm() and turn_degrees() called easy_square, but I really need to get my feet wet by writing my first two ROS2 “behavior” programs.

One that subscribes to odom and publishes cmd_vel to

Loop 4 times:

  1. drive
  2. stop when the odom says desired distance is traveled,
  3. turn
  4. stop when the odom says Dave has turned 90 degrees,

And the second program with turns based on the imu instead of wheel encoders
Loop 4 times:

  1. drive
  2. stop when the odom says desired distance is traveled,
  3. turn
  4. stop when the imu says Dave has turned 90 degrees,

Of course the “ROS way” would be to create a parameterized action goal “drive_turn” with use_imu:=false and use_imu:=true parameter and with parameterized distance, angle, and loop count, drive speed, and turn speed so that I could do:

  • out and back
  • triangle with 120 degree turns
  • square with 90 degree turns
  • pentagons with 72 degree turns
  • hexagons with 60 degree turns
  • [polygons with 360/num_sides turns]

But first I have to figure out how to display Dave’s track, and reset the track to 0.

1 Like

Got’cha covered.

  1. Open YouTube
  2. Search for “Trains”
  3. Screen-shot the appropriate video.

Viz.:

There ya’ go!
:wink:
 

P.S.
Sorry, that was too good to pass up.

1 Like

Too funny - I bet most folks would do it the way you suggested though.

Are you asking how you show a persistent track in RVIZ? I have no idea on that one. Sorry.

/K

2 Likes