ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The bullet
manifest says:
btQuaternion
constructor from Euler angles is deprecated. Please explicitly construct it and populate it seperately from euler angles, otherwise it is ambiguous as to what convention is being used."At this point, I would avoid using the bullet types directly, as they will change again in Fuerte. Here's a solution using only the tf
typedef:
// translate roll, pitch and yaw into a Quaternion
tf::Quaternion q;
q.setRPY(pcl::deg2rad(data_set[t][6]),
pcl::deg2rad(data_set[t][7]),
pcl::deg2rad(data_set[t][8]));
Note the reordering from (yaw, pitch, roll) to (roll, pitch, yaw). Blockquote
2 | answer first question |
The For the first question:
ranges.resize((size_t)size);
For the second, the bullet
manifest says:
btQuaternion
constructor from Euler angles is deprecated. Please explicitly construct it and populate it seperately from euler angles, otherwise it is ambiguous as to what convention is being used."At this point, I would avoid using the bullet types directly, as they will change again in Fuerte. Here's a solution using only the tf
typedef:
// translate roll, pitch and yaw into a Quaternion
tf::Quaternion q;
q.setRPY(pcl::deg2rad(data_set[t][6]),
pcl::deg2rad(data_set[t][7]),
pcl::deg2rad(data_set[t][8]));
Note the reordering from (yaw, pitch, roll) to (roll, pitch, yaw).
Blockquoteyaw).
3 | make answer more specific |
For the first question:
ranges.resize((size_t)size);
scan.ranges.resize((int)(90/0.25));
Be careful of that (int)
cast. I believe the floating point result will be exact in this example, so truncation should not be an issue. Generally, it is better to round explicitly.
For the second, the bullet
manifest says:
btQuaternion
constructor from Euler angles is deprecated. Please explicitly construct it and populate it seperately from euler angles, otherwise it is ambiguous as to what convention is being used."At this point, I would avoid using the bullet types directly, as they will change again in Fuerte. Here's a solution using only the tf
typedef:
// translate roll, pitch and yaw into a Quaternion
tf::Quaternion q;
q.setRPY(pcl::deg2rad(data_set[t][6]),
pcl::deg2rad(data_set[t][7]),
pcl::deg2rad(data_set[t][8]));
Note the reordering from (yaw, pitch, roll) to (roll, pitch, yaw).
4 | move btQuaternion answer to a separate question |
For Use the first question:std::vector
resize
method directly:
scan.ranges.resize((int)(90/0.25));
Be careful of that (int)
cast. I believe the floating point result will be exact in this example, so truncation should not be an issue. Generally, it is better to round explicitly.
For the second, the bullet
manifest says:
btQuaternion
constructor from Euler angles is deprecated. Please explicitly construct it and populate it seperately from euler angles, otherwise it is ambiguous as to what convention is being used."At this point, I would avoid using the bullet types directly, as they will change again in Fuerte. Here's a solution using only the tf
typedef:
// translate roll, pitch and yaw into a Quaternion
tf::Quaternion q;
q.setRPY(pcl::deg2rad(data_set[t][6]),
pcl::deg2rad(data_set[t][7]),
pcl::deg2rad(data_set[t][8]));
Note the reordering from (yaw, pitch, roll) to (roll, pitch, yaw).