sl_drivepoint error

551 views
Skip to first unread message

Jack Wilkinson

unread,
Jul 10, 2018, 7:50:49 AM7/10/18
to Robotics & Machine Vision Toolboxes
Hi Peter,

When I run my script for sl_drivepoint, the simulation stops at 8% and I get the message:

2 zero crossing signal(s) exceeded the maximum number of 1000 consecutive zero crossings at time
1.2994315847711351 and therefore, the simulation will stop.

I have tried changing the zero-crossings algorithm to adaptive as MATLAB suggests but still stops at 8%.

Could you tell me where I'm going wrong?

Here is my code:

xg = [5 5];

x0 = [8 5 pi/2];

r = sim('sl_drivepoint');

q = r.find('y');

plot(q(:,1), q(:,2));

I am running on: MATLAB R2018a with Robot Toolbox version 10.2.1.

Thanks,

Jack

Peter Corke

unread,
Jul 12, 2018, 11:23:45 AM7/12/18
to Robotics & Machine Vision Toolboxes
Hi Jack,

I don't see this problem, so let's try to figure out what's going on.  There's zero dependence on RTB so I don't think it's a path problem.  Can you try with this Simulink file, it should be the same as the distribution, but let's check this issue first.

peter
sl_drivepoint.slx

Craig Champlin

unread,
Jun 20, 2019, 1:11:26 AM6/20/19
to Robotics & Machine Vision Toolboxes
Well...  Nobody followed up on this.  I've been beating my head against it all day, WHEN SUDDENLY....  I read the FAQ...

I realized there is probably a shadow function breaking things...  Indeed, there was.  I had both the RST and RTB installed.  (University gives me all toolboxes.  Yay?). 

The problem I was having matches the one Jack was having, too many 'zero crossings'.  Turns out that there is an angdiff function in the RST which was taking over the one supplied by the RTB.  

Uninstalling RTB (for now) allows me to proceed on my merry way.  Everything works a treat.  Hurray!

So, Jack, It has been a year since you were messing with this.  If you need it, try the command "which angdiff" from the command window.  If it gives you something from the "Robotics Toolbox for Matlab" then your problem and my problem are the same.

Best of luck to you!

Craig

david...@gmail.com

unread,
Jul 4, 2020, 3:39:50 AM7/4/20
to Robotics & Machine Vision Toolboxes
I met the same problem. Another approach to resolve this is move up the Robotics Toolbox for MATLAB entry up to top. Then everything works for me without uninstalling anything.

Peter Corke

unread,
Jul 4, 2020, 6:39:32 PM7/4/20
to Robotics & Machine Vision Toolboxes
Thanks for noticing that there is an FAQ and reading it!  This is such a common and frustrating problem for RTB users.

RTB has shipped for a while now with a function called rvccheck which does the analysis and suggests remedies.

As Craig mentioned, many universities have the TAH licence which includes all Toolboxes, and by default people tend to install them at, thought that's a lot of disk space these days.  I've never met anybody who uses the Phased Array Toolbox but its versions of rotx, roty, rotz which accept arguments in degrees have caused untold pain for RTB users over the years.

peter
Reply all
Reply to author
Forward
0 new messages