{"action":"closed","issue":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/1211","labels_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/1211/labels{/name}","comments_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/1211/comments","events_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/1211/events","html_url":"https://github.com/RobotLocomotion/drake/issues/1211","id":98062752,"number":1211,"title":"Conversion to logical from sym is not possible in computeGradients","user":{"login":"aespielberg","id":3598964,"avatar_url":"https://avatars.githubusercontent.com/u/3598964?v=3","gravatar_id":"","url":"https://api.github.com/users/aespielberg","html_url":"https://github.com/aespielberg","followers_url":"https://api.github.com/users/aespielberg/followers","following_url":"https://api.github.com/users/aespielberg/following{/other_user}","gists_url":"https://api.github.com/users/aespielberg/gists{/gist_id}","starred_url":"https://api.github.com/users/aespielberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aespielberg/subscriptions","organizations_url":"https://api.github.com/users/aespielberg/orgs","repos_url":"https://api.github.com/users/aespielberg/repos","events_url":"https://api.github.com/users/aespielberg/events{/privacy}","received_events_url":"https://api.github.com/users/aespielberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-30T01:20:49Z","updated_at":"2015-08-27T02:16:20Z","closed_at":"2015-08-27T02:16:20Z","body":"Hi,\r\n\r\nI build a RigidBodyManpulator:\r\n\r\n```\r\np = RigidBodyManipulator('AcrobotWParamsGeometric.urdf')\r\n```\r\n\r\nThe contents of the urdf are:\r\n\r\n```\r\n<?xml version=\"1.0\"?>\r\n\r\n<robot xmlns=\"http://drake.mit.edu\"\r\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n xsi:schemaLocation=\"http://drake.mit.edu ../../../doc/drakeURDF.xsd\" name=\"Acrobot\">\r\n\r\n  <!--<parameter name=\"b1\" value=\".1\" lb=\"0\" />\r\n  <parameter name=\"b2\" value=\".1\" lb=\"0\" />\r\n  <parameter name=\"Ic1\" value=\".083\" lb=\"0\" />\r\n  <parameter name=\"Ic2\" value=\".33\" lb=\"0\" />-->\r\n  <parameter name=\"length1\" value=\"1.0\" lb=\"0.5\" />\r\n  <parameter name=\"length2\" value=\"2.0\" lb=\"0.5\" />\r\n\r\n  <link name=\"base_link\">\r\n    <visual>\r\n      <geometry>\r\n         <box size=\".2 .2 .2\" />\r\n      </geometry>\r\n      <material name=\"green\">\r\n\t<color rgba=\"0 1 0 1\" />\r\n      </material>\r\n    </visual>\r\n  </link>\r\n\r\n  <link name=\"upper_link\">\r\n    <inertial>\r\n      <origin xyz=\"0 0 -$length1 / 2\" rpy=\"0 0 0\" />\r\n      <mass value=\"1\" />\r\n      <!--<inertia ixx=\"1\" ixy=\"0\" ixz=\"0\" iyy=\"$Ic1\" iyz=\"0\" izz=\"1\" />-->\r\n      <inertia ixx=\"1\" ixy=\"0\" ixz=\"0\" iyy=\"1\" iyz=\"0\" izz=\"1\" />\r\n    </inertial>\r\n    <visual>\r\n      <origin xyz=\"0 0 -$length1 / 2\" rpy=\"0 0 0\" />\r\n      <geometry>\r\n         <cylinder length=\"$length1\" radius=\".05\" />\r\n      </geometry>\r\n      <material name=\"red\">\r\n\t<color rgba=\"1 0 0 1\" />\r\n      </material>\r\n    </visual>\r\n  </link>\r\n\r\n  <link name=\"lower_link\">\r\n    <inertial>\r\n      <origin xyz=\"0 0 -$length2 / 2\" rpy=\"0 0 0\" />\r\n      <mass value=\"1\" />\r\n      <!--<inertia ixx=\"1\" ixy=\"0\" ixz=\"0\" iyy=\"$Ic2\" iyz=\"0\" izz=\"1\" />-->\r\n       <inertia ixx=\"1\" ixy=\"0\" ixz=\"0\" iyy=\"1\" iyz=\"0\" izz=\"1\" />\r\n    </inertial>\r\n    <visual>\r\n      <origin xyz=\"0 0 -$length2 / 2\" rpy=\"0 0 0\" />\r\n      <geometry>\r\n         <cylinder length=\"$length2\" radius=\".05\" />\r\n      </geometry>\r\n      <material name=\"blue\">\r\n\t<color rgba=\"0 0 1 1\" />\r\n      </material>\r\n    </visual>\r\n  </link>\r\n  \r\n  <joint name=\"shoulder\" type=\"continuous\">\r\n    <parent link=\"base_link\" />\r\n    <child link=\"upper_link\" />\r\n    <origin xyz=\"0 .15 0\" />\r\n    <axis xyz=\"0 1 0\" />\r\n    <!--<dynamics damping=\"$b1\" />-->\r\n    <dynamics damping=\".1\" />\r\n  </joint>\r\n\r\n  <joint name=\"elbow\" type=\"continuous\">\r\n    <parent link=\"upper_link\" />\r\n    <child link=\"lower_link\" />\r\n    <origin xyz=\"0 .1 -$length1\" />\r\n    <axis xyz=\"0 1 0\" />\r\n    <!--<dynamics damping=\"$b2\" />-->\r\n     <dynamics damping=\".1\" />\r\n  </joint>\r\n\r\n  <transmission type=\"SimpleTransmission\" name=\"elbow_trans\">\r\n    <actuator name=\"elbow_torque\" />\r\n    <joint name=\"elbow\" />\r\n    <mechanicalReduction>1</mechanicalReduction>\r\n  </transmission>\r\n\r\n<frame name=\"hand\" link=\"lower_link\" xyz=\"0 0 -$length2\" rpy=\"0 0 0\" />\r\n</robot>\r\n```\r\n\r\nNow I try to run the following command:\r\n\r\n```\r\ngenerateGradients('dynamics',3,'dynamicsGradients',p,0,randn(4,1),0);\r\n```\r\n\r\nBut I get the following output:\r\n\r\n```\r\nVariable name not symbolicisized\r\nVariable urdf not symbolicisized\r\nVariable body not symbolicisized\r\nVariable actuator not symbolicisized\r\nVariable param_db not symbolicisized\r\nVariable loop not symbolicisized\r\nVariable sensor not symbolicisized\r\nVariable force not symbolicisized\r\nVariable gravity not symbolicisized\r\nVariable dim not symbolicisized\r\nVariable terrain not symbolicisized\r\nVariable num_contact_pairs not symbolicisized\r\nVariable contact_options not symbolicisized\r\nVariable contact_constraint_id not symbolicisized\r\nVariable cached_terrain_contact_points_struct not symbolicisized\r\nVariable frame not symbolicisized\r\nVariable robot_state_frames not symbolicisized\r\nVariable robot_position_frames not symbolicisized\r\nVariable robot_velocity_frames not symbolicisized\r\nVariable use_new_kinsol not symbolicisized\r\nVariable num_positions not symbolicisized\r\nVariable num_velocities not symbolicisized\r\nVariable num_position_constraints not symbolicisized\r\nVariable num_velocity_constraints not symbolicisized\r\nVariable position_constraints not symbolicisized\r\nVariable position_constraint_ids not symbolicisized\r\nVariable velocity_constraints not symbolicisized\r\nVariable velocity_constraint_ids not symbolicisized\r\nVariable joint_limit_min not symbolicisized\r\nVariable joint_limit_max not symbolicisized\r\nVariable joint_limit_constraint_id not symbolicisized\r\nVariable only_loops not symbolicisized\r\nVariable umin not symbolicisized\r\nVariable umax not symbolicisized\r\nConversion to logical from sym is not possible.\r\n\r\nError in RigidBodyManipulator/checkDirty (line 2068)\r\n      if (obj.dirty)\r\n\r\nError in RigidBodyManipulator/manipulatorDynamics (line 15)\r\ncheckDirty(obj);\r\n\r\nError in Manipulator/dynamics (line 78)\r\n        [H,C,B] = manipulatorDynamics(obj,q,v);\r\n\r\nError in generateGradients (line 108)\r\nf = feval(fun,a{:});\r\n```\r\n\r\nAny idea why this is happening?"}}