-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved SimpleCarState: AgentState #517
Improved SimpleCarState: AgentState #517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky just a couple comments.
src/protobuf/agent_state.proto
Outdated
optional Vector3d position = 4; | ||
|
||
/// \brief Orientation of the agent (in euler). | ||
optional Euler orientation = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky nit: consider RPYAngles
instead of Euler
. There're many axis/angle conventions for the former and it may lead to confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, you're right. Just renamed it, thanks!
src/protobuf/agent_state.proto
Outdated
optional Euler orientation = 5; | ||
|
||
/// \brief Current speed module of the car in radians | ||
optional double velocity = 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky shouldn't these be two Vector3d
fields, for linear_velocity
and angular_velocity
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added them both, thanks!
9865c4a
to
411d23e
Compare
Thanks for the review @hidmic , I just finished addressing your comments. |
411d23e
to
c029bdf
Compare
c029bdf
to
821003c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky I left some more comments. About deprecating the SimpleCarState translators, I'm not so sure we won't ever need them again. @basicNew @stonier what do you think?
src/protobuf/rpy_angles.proto
Outdated
|
||
/// \ingroup ignition.msgs | ||
/// \interface RPYAngles | ||
/// \brief The representation of orientation in euler angles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky nit: I think that being explicit about frame conventions is never a waste of space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done!
src/protobuf/agent_state.proto
Outdated
/// \ingroup ignition.msgs | ||
/// \interface AgentState | ||
/// \brief The ignition equivalent of the LCM command used to show the | ||
/// current status of a delphyne agent in a simulation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky nit: it'd be nice to be specific about frame conventions for pose and velocity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
const drake::Isometry3<double>& pose = drake_message.get_pose(i); | ||
// Translates pose from quaternion to euler. | ||
const Eigen::Vector3d euler_rotation = | ||
pose.rotation().eulerAngles(0, 1, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky nit: a small explanation on the indexes chosen would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
EXPECT_NEAR(state_message.heading(), kHeading, kAccuracy); | ||
EXPECT_NEAR(state_message.velocity(), kVelocity, kAccuracy); | ||
EXPECT_EQ(state_message.position().x(), kX); | ||
EXPECT_NEAR(state_message.position().y(), kY, kAccuracy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky why the difference in the last two assertions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, my bad. Just fixed it. Thanks!
EXPECT_NEAR(state_message.velocity(), kVelocity, kAccuracy); | ||
EXPECT_EQ(state_message.position().x(), kX); | ||
EXPECT_NEAR(state_message.position().y(), kY, kAccuracy); | ||
EXPECT_NEAR(state_message.orientation().yaw(), kHeading, kAccuracy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky I think it is valuable to check that the other components are 0 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
Thanks for the review @hidmic , just finished addressing your comments. This is ready for another pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple nits. LGTM!
src/protobuf/agent_state.proto
Outdated
/// - linear_velocity: A Vector3 with the components of velocity projected over | ||
/// each of the x, y and z axes, respectively. Measured in m/s. | ||
/// - angular_velocity: A Vector3 with the angular velocities around the axes | ||
/// x, y and z, respectively. Measured in rad/s. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky nit: stating it's a right hand convention would be valuable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks!
src/protobuf/rpy_angles.proto
Outdated
/// \ingroup ignition.msgs | ||
/// \interface RPYAngles | ||
/// \brief The representation of orientation in euler angles following the | ||
/// x-y-z convention (roll-pitch-yaw). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky nit: same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks!
src/protobuf/agent_state.proto
Outdated
/// - orientation: In euler angles following the x-y-z convention | ||
/// (roll, pitch, yaw). | ||
/// - linear_velocity: A Vector3 with the components of velocity projected over | ||
/// each of the x, y and z axes, respectively. Measured in m/s. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky nit: the fact that vector components are projections over a vector base is kind of implied, not sure if it adds any value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks!
This PR fixes #505
SimpleCarState
andSimpleCarState_v
by an enhanced version calledAgentState
andAgentState_v
.x
,y
,z
) and orientation in euler (roll
,pitch
,yaw
).