Skip to content
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

Add bindings for scout omni #59

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions python/ugv_sdk_py/src/scout_robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ void BindScoutRobot(pybind11::module &m) {
.def("get_robot_state", &ScoutRobot::GetRobotState, "Get the robot state")
.def("get_actuator_state", &ScoutRobot::GetActuatorState, "Get the actuator state")
.def("get_common_sensor_state", &ScoutRobot::GetCommonSensorState, "Get the common sensor state");

// ScoutMiniOmniRobot class
py::class_<ScoutMiniOmniRobot, ScoutRobot>(m_scout_robot, "ScoutMiniOmniRobot")
.def(py::init<ProtocolVersion>(),
py::arg("protocol") = ProtocolVersion::AGX_V2,
"Constructor for ScoutMiniOmniRobot with optional protocol")
.def("set_omni_motion_command", &ScoutOmniInterface::SetMotionCommand,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Micheal, can you please update the name to set_motion_command to be consistent with the C++ interface.
Also, we dont have a omni variant on hand to test. So far it looks ok based on candump output, but if you have one, can you please verify it works.

py::arg("linear_vel"), py::arg("angular_vel"), py::arg("lateral_velocity"),
"Set the motion command for the robot");
}
// clang-format on
} // namespace westonrobot