42 static const std::string
LOGNAME =
"cpp_interface_example";
49 int main(
int argc,
char** argv)
55 planning_scene_monitor = std::make_shared<planning_scene_monitor::PlanningSceneMonitor>(
"robot_description");
56 if (!planning_scene_monitor->getPlanningScene())
62 planning_scene_monitor->startSceneMonitor();
63 planning_scene_monitor->startWorldGeometryMonitor(
67 planning_scene_monitor->startStateMonitor();
71 std::thread jogging_thread([&]() { jog_interface.
startMainLoop(); });
74 geometry_msgs::TwistStamped velocity_msg;
75 velocity_msg.header.frame_id =
"base_link";
76 velocity_msg.twist.linear.y = 0.01;
77 velocity_msg.twist.linear.z = -0.01;
80 uint num_commands = 0;
83 while (
ros::ok() && num_commands < 200)
96 control_msgs::JointJog base_joint_command;
97 base_joint_command.joint_names.push_back(
"elbow_joint");
98 base_joint_command.velocities.push_back(0.2);
103 while (
ros::ok() && num_commands < 200)
112 sensor_msgs::JointState current_joint_state = jog_interface.
getJointState();
121 jogging_thread.join();
#define ROS_ERROR_STREAM_NAMED(name, args)
StatusCode getJoggerStatus()
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char **argv)
#define ROS_INFO_STREAM_NAMED(name, args)
static const std::string DEFAULT_PLANNING_SCENE_WORLD_TOPIC
void provideJointCommand(const control_msgs::JointJog &joint_command)
Send joint position(s) commands.
void provideTwistStampedCommand(const geometry_msgs::TwistStamped &velocity_command)
Provide a Cartesian velocity command to the jogger. The units are determined by settings in the yaml ...
static const std::string LOGNAME
static const std::string DEFAULT_COLLISION_OBJECT_TOPIC
sensor_msgs::JointState getJointState()