Re-create Figure 6 in "Safe Learning in Robotics" errors
See original GitHub issueHey Jacopo,
Thanks for the great review paper and open sourcing the accompanying codes here.
I would like to reproduce Figure 6 by following commands but got error messages after successfully loading five GP models as
#########################################
# Loading GP dimension 5 #
#########################################
Path: ./trained_gp_model/best_model_5.pth
Loaded!
Traceback (most recent call last):
File "./gp_mpc_experiment.py", line 179, in <module>
ctrl.learn()
File "/home/jwang/Control_ws/src/safe-control-gym/safe_control_gym/controllers/mpc/gp_mpc.py", line 809, in learn
self.reset()
File "/home/jwang/Control_ws/src/safe-control-gym/safe_control_gym/controllers/mpc/gp_mpc.py", line 899, in reset
self.setup_gp_optimizer(n_ind_points)
File "/home/jwang/Control_ws/src/safe-control-gym/safe_control_gym/controllers/mpc/gp_mpc.py", line 562, in setup_gp_optimizer
mean_post_factor_val, Sigma, K_zind_zind_inv, z_ind_val = self.precompute_sparse_gp_values(n_ind_points)
File "/home/jwang/Control_ws/src/safe-control-gym/safe_control_gym/controllers/mpc/gp_mpc.py", line 394, in precompute_sparse_gp_values
inds, dist_mat = pairwise_distances_argmin_min(centroids, inputs[:, self.input_mask])
File "/home/jwang/anaconda3/envs/safe/lib/python3.8/site-packages/sklearn/metrics/pairwise.py", line 680, in pairwise_distances_argmin_min
values, indices = PairwiseDistancesArgKmin.compute(
File "sklearn/metrics/_pairwise_distances_reduction.pyx", line 672, in sklearn.metrics._pairwise_distances_reduction.PairwiseDistancesArgKmin.compute
File "sklearn/metrics/_pairwise_distances_reduction.pyx", line 1055, in sklearn.metrics._pairwise_distances_reduction.FastEuclideanPairwiseDistancesArgKmin.__init__
File "sklearn/metrics/_dist_metrics.pyx", line 1300, in sklearn.metrics._dist_metrics.DatasetsPair.get_for
File "sklearn/metrics/_dist_metrics.pyx", line 1349, in sklearn.metrics._dist_metrics.DenseDenseDatasetsPair.__init__
File "stringsource", line 658, in View.MemoryView.memoryview_cwrapper
File "stringsource", line 349, in View.MemoryView.memoryview.__cinit__
ValueError: ndarray is not C-contiguous
I wonder if you could help with this? Thank you.
Regards, Jie
Issue Analytics
- State:
- Created a year ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
From Learning-Based Control to Safe Reinforcement Learning
We highlight some of the open challenges that will drive the field of robot learning in the coming years, and em- phasize the...
Read more >utiasDSL/safe-control-gym: PyBullet CartPole and Quadrotor ...
Re-create the Results in "Safe Learning in Robotics" [arXiv link] · Figure 6—Robust GP-MPC [1] · Figure 7—Safe RL Exploration [2] · Figure...
Read more >Safe Robot Learning in Assistive Devices through Neural ...
In this paper, we derive an algorithm for training neural networks controllers to satisfy given safety specifications, in addition to fitting the given ......
Read more >Active learning in robotics: A review of control principles
This is a review of active learning in robotics, focusing on methods amenable to the demands ... 3(c)) while also achieving lower stabilization...
Read more >Reinforcement Learning in Robotics: A Survey
Figure 1: This figure illustrates a small sample of robots with behaviors that were re- inforcement learned. These cover the whole range of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://arxiv.org/abs/2109.06325 (it is now officially an IROS/RA-L paper)
@adamhall The plot looks pretty much the same as this one with both the existing and retrained models.