Main Page
Classes
Files
File List
File Members
src
armadillo_teleop.cpp
Go to the documentation of this file.
1
#include <
armadillo2_teleop/armadillo_teleop.h
>
2
3
4
Armadillo2Teleop::Armadillo2Teleop
(
ros::NodeHandle
&nh)
5
{
6
nh_
= &nh;
7
twist_pub_
=
nh_
->
advertise
<geometry_msgs::Twist>(
"cmd_vel"
, 5);
8
torso_pub_
=
nh_
->
advertise
<std_msgs::Float64>(
"torso_effort_controller/command"
, 5);
9
}
10
11
void
Armadillo2Teleop::drive
()
12
{
13
geometry_msgs::Twist twist_msg;
14
twist_msg.angular.z =
twist
.
axis_angular
*
twist
.
scale_angular
;
15
twist_msg.linear.x =
twist
.
axis_linear
*
twist
.
scale_linear
;
16
twist_pub_
.
publish
(twist_msg);
17
}
18
19
void
Armadillo2Teleop::moveTorso
()
20
{
21
std_msgs::Float64 torso_pos;
22
torso_pos.data =
torso
.
axis_updown
+
torso
.
inc_updown
;
23
torso_pub_
.
publish
(torso_pos);
24
}
twist_joy::scale_linear
float scale_linear
Definition:
armadillo_teleop.h:19
Armadillo2Teleop::twist
twist_joy twist
Definition:
armadillo_teleop.h:78
ros::NodeHandle
Armadillo2Teleop::Armadillo2Teleop
Armadillo2Teleop(ros::NodeHandle &nh)
Definition:
armadillo_teleop.cpp:4
Armadillo2Teleop::moveTorso
void moveTorso()
Definition:
armadillo_teleop.cpp:19
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
armadillo_teleop.h
Armadillo2Teleop::drive
void drive()
Definition:
armadillo_teleop.cpp:11
torso_joy::inc_updown
float inc_updown
Definition:
armadillo_teleop.h:28
torso_joy::axis_updown
float axis_updown
Definition:
armadillo_teleop.h:27
twist_joy::axis_linear
float axis_linear
Definition:
armadillo_teleop.h:15
Armadillo2Teleop::torso
torso_joy torso
Definition:
armadillo_teleop.h:77
Armadillo2Teleop::nh_
ros::NodeHandle * nh_
Definition:
armadillo_teleop.h:71
Armadillo2Teleop::twist_pub_
ros::Publisher twist_pub_
Definition:
armadillo_teleop.h:72
Armadillo2Teleop::torso_pub_
ros::Publisher torso_pub_
Definition:
armadillo_teleop.h:73
ros::NodeHandle::advertise
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
twist_joy::axis_angular
float axis_angular
Definition:
armadillo_teleop.h:16
twist_joy::scale_angular
float scale_angular
Definition:
armadillo_teleop.h:18
armadillo2_teleop
Author(s):
autogenerated on Wed Jan 3 2018 03:47:53