RedwanNewaz / matlab-toolboxes-robotics-vision

Automatically exported from code.google.com/p/matlab-toolboxes-robotics-vision
0 stars 0 forks source link

Noise not calculated for vehicle.step #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. V = diag([0.005, 0.5/pi/180]).^2
2. veh = Vehicle(V)
3. odo = veh.step(1, 0.3)

What is the expected output? What do you see instead?

The expected output is [1 0.3] +- some noise,
The actual output is always exactly [1 0.3]

What version of the product are you using? On what operating system?

I am using Robotics Toolbox v 9.8 on OS X 10.7.5

Matlab version is:
EDU>> ver
--------------------------------------------------------------------------------
-----
MATLAB Version 7.12.0.635 (R2011a)
MATLAB License Number: STUDENT
Operating System: Mac OS X  Version: 10.7.5 Build: 11G63 
Java VM Version: Java 1.6.0_37-b06-434-11M3909 with Apple Inc. Java HotSpot(TM) 
64-Bit Server VM mixed mode
--------------------------------------------------------------------------------
-----
MATLAB                                                Version 7.12       
(R2011a)
Simulink                                              Version 7.7        
(R2011a)
Computer Vision System Toolbox                        Version 4.0        
(R2011a)
Control System Toolbox                                Version 9.1        
(R2011a)
Curve Fitting Toolbox                                 Version 3.1        
(R2011a)
DSP System Toolbox                                    Version 8.0        
(R2011a)
Fixed-Point Toolbox                                   Version 3.3        
(R2011a)
Global Optimization Toolbox                           Version 3.1.1      
(R2011a)
Image Acquisition Toolbox                             Version 4.1        
(R2011a)
Image Processing Toolbox                              Version 7.2        
(R2011a)
Instrument Control Toolbox                            Version 2.12       
(R2011a)
Neural Network Toolbox                                Version 7.0.1      
(R2011a)
Optimization Toolbox                                  Version 6.0        
(R2011a)
Partial Differential Equation Toolbox                 Version 1.0.18     
(R2011a)
Robotics Toolbox                                      Version 9.8.0             

Signal Processing Toolbox                             Version 6.15       
(R2011a)
SimElectronics                                        Version 1.6        
(R2011a)
SimMechanics                                          Version 3.2.2      
(R2011a)
Statistics Toolbox                                    Version 7.5        
(R2011a)
Symbolic Math Toolbox                                 Version 5.6        
(R2011a)

Please provide any additional information below.

According to the matlab documentation here: 
http://www.mathworks.com/help/matlab/ref/if.html, this is the expected behavior 
if the matrix contains zeros. 

The offending line appears to be Vehicle.m:302 - 304, which is

            if veh.V
                odo = veh.odometry + randn(1,2)*veh.V;
            end

I believe it should read

            if any(veh.V)
                odo = veh.odometry + randn(1,2)*veh.V;
            end

This checks if veh.V has any non-zero elements, rather than if it has all 
non-zero elements. 

Original issue reported on code.google.com by John.A.D...@gmail.com on 23 Feb 2013 at 7:30