Bicycle model not working using the new Toolbox

226 views
Skip to first unread message

cjh...@gmail.com

unread,
Nov 25, 2020, 4:35:33 PM11/25/20
to Robotics & Machine Vision Toolboxes
Hi, Peter:

I just installed the latest Robotics Toolbox, and run into following problem (this is the example in your book(2nd) at pp. 156 - 157 :
V = diag([0.02, 0.5*pi/180].^2);
veh= Bicycle('covar', V);
odo = veh.step(1, 0.3);
veh.x';
veh.f([0 0 0], odo);
veh.add_driver( RandomPath(10) );
veh.run()
Error using patch
Unrecognized property axis for class Patch.

Error in plot_poly (line 149)
                h = patch(x', y', opt.fillcolor, ...

Error in plot_vehicle>draw_robot (line 220)
        h = plot_poly(corners, 'animate', 'axis', opt.axis, args{:});

Error in plot_vehicle (line 117)
        h.vehicle = draw_robot(d, opt, args);

Error in Vehicle.plotv (line 547)
            h = plot_vehicle(varargin{1}, 'fillcolor', 'b', 'alpha', 0.5);

Error in Vehicle/plot (line 419)
                veh.vhandle = Vehicle.plotv(veh.x, varargin{:});

Error in Vehicle/run (line 349)
            veh.plot();


cjh...@gmail.com

unread,
Nov 27, 2020, 10:53:14 AM11/27/20
to Robotics & Machine Vision Toolboxes
Hi, Peter:

My issue (see above) is the same as Charles' veh.run() error. 

After seeing your response, especially the "which imorph" ,  I tried it on my Matlab.

I thought there is something with the Machine Vision Toolbox from the path generated by "which imorph". 

So, I re-installed Machine Vision Toolbox. 

After that, veh,run() worked. 

However, veh.run() will not work if I exit Matlab, then, re-start Matlab. 

In order for veh.run() to work again, I have to re-install the Machine Vision Toolbox. 

This is a get-around temperate solution to this issue. 

But, I hope that you may find a permanent solution by getting some clue from this get-around solution. 

Thank you.

Ning

Peter Corke

unread,
Dec 1, 2020, 5:58:15 AM12/1/20
to Robotics & Machine Vision Toolboxes
I'm not convinced you are running the latest version of RTB.  The line numbers don't match up.  The code runs fine for me.  Please send me the output of

>> rvccheck

cjh...@gmail.com

unread,
Dec 3, 2020, 10:45:57 AM12/3/20
to Robotics & Machine Vision Toolboxes
Hi, Peter:

This is what I have:

>>  rvccheck
You are using:
 - MATLAB release 2020b
 - Machine Vision Toolbox 4.3.0 2018-03-11 [mltbx install to Add-Ons]
 - Machine Vision Toolbox 4.3.0 2018-03-11 [mltbx install to Add-Ons]


Peter Corke

unread,
Dec 5, 2020, 5:29:00 PM12/5/20
to Robotics & Machine Vision Toolboxes
that's weird that you have MVTB twice but no RTB.  Please do 

>> which ctraj

and tell me the contents of the RELEASE file in the same folder

cjh...@gmail.com

unread,
Dec 7, 2020, 12:46:26 PM12/7/20
to Robotics & Machine Vision Toolboxes
Hi, Peter:

Thank you for responding to my post. 

Here is what I have:

>> rvccheck
You are using:
 - MATLAB release 2020b
 - Machine Vision Toolbox 4.3.0 2018-03-11 [mltbx install to Add-Ons]
 - Machine Vision Toolbox 4.3.0 2018-03-11 [mltbx install to Add-Ons]
>> which ctraj
C:\Users\ECPI\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\Robotics Toolbox for MATLAB\ctraj.m
>> 

The RELEASE contains only one number: 10.4

I am going to teach robotics based on your book (2nd) in one week from home. 

My university gave a license to allow me to install Matlab on my home computer. 

After installing Matlab, I went to your website, downloaded and installed both Robotics and Machine Vision toolboxes using the second method: Install from .mltbx file. 

I did not downloaded your toolboxes of any versions to this computer before. 

The only thing I want to point out is that I first downloaded a free 30 day trial version of Matlab, then, I got the license from my university, and activated that  license for my Matlab. 

Thanks for your time and effort. 

Ning


Peter Corke

unread,
Dec 12, 2020, 4:44:33 PM12/12/20
to Robotics & Machine Vision Toolboxes
weird.  You're going to have to help me get to the bottom of this.

>> which idisp
>> which ctraj
>> which patch

cjh...@gmail.com

unread,
Dec 20, 2020, 10:37:39 AM12/20/20
to Robotics & Machine Vision Toolboxes
Hi, Peter:

Sorry for responding to your post so late. I have been busy with other teaching stuff. 

Here are what I have:
>> which idisp
C:\Users\ECPI\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\Machine Vision Toolbox for MATLAB(4)\vision\idisp.m
>> which ctraj
C:\Users\ECPI\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\Robotics Toolbox for MATLAB\ctraj.m
>> which patch
built-in (C:\Program Files\MATLAB\R2020b\toolbox\matlab\graphics\primitive\patch)
>> 


cjh...@gmail.com

unread,
Jan 1, 2021, 3:53:44 PM1/1/21
to Robotics & Machine Vision Toolboxes
Hi, Peter:

After completely re-downloading and re-installing the toolboxes, this issue still persist.

I got exactly the same error message as in my initial post of this issue. 

To make veh.run() to work, I have to use the same trick that mentioned above, i, e, re-install MVTB. 

Ning

Shouling He

unread,
Nov 27, 2021, 5:27:40 AM11/27/21
to Robotics & Machine Vision Toolboxes
Hi, Peter, I have the same problem as above. I had it run in the spring semester. But, now, I got the errors below
Error using patch
Unrecognized property axis for class Patch.
Error in plot_poly (line 149)
                h = patch(x', y', opt.fillcolor,'EdgeColor',...
Error in plot_vehicle>draw_robot (line 220)
        h = plot_poly(corners, 'animate', 'axis', opt.axis, args{:});
Error in plot_vehicle (line 117)
        h.vehicle = draw_robot(d, opt, args);
Error in Vehicle.plotv (line 547)
            h = plot_vehicle(varargin{1}, 'fillcolor', 'b', 'alpha', 0.5);
Error in Vehicle/plot (line 419)
                veh.vhandle = Vehicle.plotv(veh.x, varargin{:});
Error in Vehicle/run (line 349)
            veh.plot(); 
I wonder whether MATLAB company has updated the required arguments for the function patch.
Best,
Shouling from NYC, USA.  
Reply all
Reply to author
Forward
0 new messages