Cube with different side color in RGB
I created a cube using rigid body tree (code below). now i wanted to color different side of the cube, red, gree, blue, etc… but when i use the command addVisual(body, ‘box’, [1 1 1], ‘FaceColor’, ‘r’); for a side to be in red color, the issue is, it is giving me error of too many arguments.
cube = rigidBodyTree;
body1 = rigidBody(‘body1’);
joint1 = rigidBodyJoint(‘joint1′,’floating’);
body1.Joint = joint1;
addVisual(body1, ‘box’, [1 1 1]);
%addVisual(body, ‘box’, [1 1 1], ‘FaceColor’, colors{i});
addBody(cube,body1,cube.BaseName);I created a cube using rigid body tree (code below). now i wanted to color different side of the cube, red, gree, blue, etc… but when i use the command addVisual(body, ‘box’, [1 1 1], ‘FaceColor’, ‘r’); for a side to be in red color, the issue is, it is giving me error of too many arguments.
cube = rigidBodyTree;
body1 = rigidBody(‘body1’);
joint1 = rigidBodyJoint(‘joint1′,’floating’);
body1.Joint = joint1;
addVisual(body1, ‘box’, [1 1 1]);
%addVisual(body, ‘box’, [1 1 1], ‘FaceColor’, colors{i});
addBody(cube,body1,cube.BaseName); I created a cube using rigid body tree (code below). now i wanted to color different side of the cube, red, gree, blue, etc… but when i use the command addVisual(body, ‘box’, [1 1 1], ‘FaceColor’, ‘r’); for a side to be in red color, the issue is, it is giving me error of too many arguments.
cube = rigidBodyTree;
body1 = rigidBody(‘body1’);
joint1 = rigidBodyJoint(‘joint1′,’floating’);
body1.Joint = joint1;
addVisual(body1, ‘box’, [1 1 1]);
%addVisual(body, ‘box’, [1 1 1], ‘FaceColor’, colors{i});
addBody(cube,body1,cube.BaseName); rigid body, matlab, matlab code, addvisual, rigidbody MATLAB Answers — New Questions