Go to the documentation of this file.
37 #include <pybind11/pybind11.h>
38 #include <pybind11/numpy.h>
39 #include <pybind11/stl.h>
50 m.doc() =
"Representation of a robot's state. This includes position, velocity, acceleration and effort.";
51 py::class_<RobotState, RobotStatePtr>(m,
"RobotState")
52 .def(py::init<const robot_model::RobotModelConstPtr&>(), py::arg(
"robot_model"))
60 py::return_value_policy::reference)
63 .def(
"setJointGroupPositions",
65 .def(
"setJointGroupPositions",
67 .def(
"satisfiesBounds",
69 py::arg(
"joint_model_group"), py::arg(
"margin") = 0.0)
71 .def(
"printStateInfo",
77 .def(
"printStatePositions",
80 s.printStatePositions(ss);
86 s.printStatePositions(ss);
94 "robotStateToRobotStateMsg",
95 [](
const RobotState& state,
bool copy_attached_bodies) {
96 moveit_msgs::RobotState state_msg;
100 py::arg(
"state"), py::arg(
"copy_attached_bodies") =
true);
Core components of MoveIt.
const JointModel * getJointModel(const std::string &joint) const
Get the model of a particular joint.
std::size_t getVariableCount() const
Get the number of variables that make up this state.
const LinkModel * getLinkModel(const std::string &link) const
Get the model of a particular link.
bool hasVelocities() const
By default, if velocities are never set or initialized, the state remembers that there are no velocit...
Representation of a robot's state. This includes position, velocity, acceleration and effort.
void setToRandomPositions()
Set all joints to random values. Values will be within default bounds.
const std::vector< std::string > & getVariableNames() const
Get the names of the variables that make up this state, in the order they are stored in memory.
void update(bool force=false)
Update all transforms.
double * getVariablePositions()
Get a raw pointer to the positions of the variables stored in this state. Use carefully....
void def_robot_state_bindings(py::module &m)
bool satisfiesBounds(double margin=0.0) const
void setJointGroupPositions(const std::string &joint_group_name, const double *gstate)
Given positions for the variables that make up a group, in the order found in the group (including va...
const JointModelGroup * getJointModelGroup(const std::string &group) const
Get the model of a particular joint group.
bool jointStateToRobotState(const sensor_msgs::JointState &joint_state, RobotState &state)
Convert a joint state to a MoveIt robot state.
void robotStateToRobotStateMsg(const RobotState &state, moveit_msgs::RobotState &robot_state, bool copy_attached_bodies=true)
Convert a MoveIt robot state to a robot state message.
moveit_core
Author(s): Ioan Sucan
, Sachin Chitta , Acorn Pooley
autogenerated on Sun Nov 3 2024 03:26:15