3 import matplotlib.pyplot
as plt
6 from dynamic_graph.sot_talos_balance.utils.gazebo_utils
import GazeboLinkStatePublisher
7 from dynamic_graph.sot_talos_balance.utils.run_test_utils
import (
19 pub = GazeboLinkStatePublisher(
"base_link", 1000)
20 print(
"Starting Gazebo link state publisher...")
22 print(
"Gazebo link state publisher started")
23 input(
"Wait before running the test")
36 pos_data = np.loadtxt(
39 vel_data = np.loadtxt(
46 plt.plot(com_data[:, 1],
"b-")
47 plt.plot(com_data[:, 2],
"r-")
48 plt.plot(com_data[:, 3],
"g-")
50 plt.legend([
"x",
"y",
"z"])
53 plt.plot(pos_data[:, 1],
"b-")
54 plt.plot(pos_data[:, 2],
"r-")
55 plt.plot(pos_data[:, 3],
"g-")
56 plt.title(
"Position measure")
57 plt.legend([
"x",
"y",
"z"])
60 plt.plot(pos_data[:, 4],
"b-")
61 plt.plot(pos_data[:, 5],
"r-")
62 plt.plot(pos_data[:, 6],
"g-")
63 plt.title(
"Orientation measure")
64 plt.legend([
"yaw",
"pitch",
"roll"])
67 plt.plot(vel_data[:, 1],
"b-")
68 plt.plot(vel_data[:, 2],
"r-")
69 plt.plot(vel_data[:, 3],
"g-")
70 plt.title(
"Linear velocity measure")
71 plt.legend([
"x",
"y",
"z"])
74 plt.plot(vel_data[:, 4],
"b-")
75 plt.plot(vel_data[:, 5],
"r-")
76 plt.plot(vel_data[:, 6],
"g-")
77 plt.title(
"Angular velocity measure")
78 plt.legend([
"x",
"y",
"z"])
80 input(
"Wait before leaving the simulation")
81 print(
"Stopping Gazebo link state publisher...")
84 print(
"Gazebo link state publisher stopped")