First of all install update and upgrade your system:
$ sudo apt update
$ sudo apt upgrade
Then, install required libraries:
""" | |
Source code for this visualization of KL divergence asymmetry: | |
https://twitter.com/ari_seff/status/1303741288911638530 | |
KL computation is based on | |
https://tuananhle.co.uk/notes/reverse-forward-kl.html | |
Install manim (https://github.com/3b1b/manim) and run with: | |
$ manim asymkl.py AsymKL -pl | |
""" |
import numpy as np | |
from matplotlib.cm import get_cmap | |
import rospy | |
import sensor_msgs.msg as sensor_msgs | |
import std_msgs.msg as std_msgs | |
def point_cloud(points, parent_frame): | |
""" Creates a point cloud message. |
#!/usr/bin/env python | |
# PointCloud2 color cube | |
# https://answers.ros.org/question/289576/understanding-the-bytes-in-a-pcl2-message/ | |
import rospy | |
import struct | |
from sensor_msgs import point_cloud2 | |
from sensor_msgs.msg import PointCloud2, PointField | |
from std_msgs.msg import Header |