I learned using rqt_multiplot to visualize data and dealing with ros bag.
exercise4.mp4
-
The node
/ekf_localization
uses measurements from wheel odometry, IMU sensor, and visual odometry to estimate the 3D robot pose by extended kalman filter# launch the file from exercise 3 # in a new terminal rosnode info /ekf_localization
- Publications:
/odometry/filtered [nav_msgs/Odometry]
- Subscriptions:
imu/data [sensor_msgs/Imu]
: 3D orientationsmb_velocity_controller/odom [nav_msgs/Odometry]
: 2D pose from wheel
- Publications:
-
Use
rqt_multiplot
to plot the path of simulated robot in xy-plane -
Install multiplot and run it
# install
sudo apt-get install ros-noetic-rqt-multiplot
# run
rqt_multiplot
- New configuration -> configure plot -> add curve -> save configuration as
-
Download the rosbag
smb_navigation.bag
from the course website and inspect itrosbag info smb_navigation.bag
-
Create a new launch file that starts the node
ekf_localization_node
-
Use
rqt_multiplot
to plot the path of the recorded robot# set the parameter `/use_sim_time` to true rosparam set use_sim_time true # play the bag file rosbag play smb_navigation.bag --clock
-
In the newly-created launch file (refer to the control.launch):
- Add a
robot_state_publisher
node. See the reference here - Add a frame named
smb_top_view
. See here, section 6.3 /use_sim_time
can be set true in launch file- Add
rqt_multiplot
- OPTIONAL 👏 Play the bag at 50% of the nominal speed
- Add a