corrects commander_atan
This commit is contained in:
parent
17a90f6d41
commit
ae36147f73
1 changed files with 12 additions and 13 deletions
|
@ -77,29 +77,28 @@ class Run
|
||||||
|
|
||||||
geometry_msgs::Twist::Ptr mvt(new geometry_msgs::Twist());
|
geometry_msgs::Twist::Ptr mvt(new geometry_msgs::Twist());
|
||||||
|
|
||||||
if (fabs(in.y) > fabs(in.x))
|
// if (fabs(in.y) > fabs(in.x))
|
||||||
{
|
// {
|
||||||
out.y = f.y(in.y);
|
out.y = f.y(in.y);
|
||||||
if (out.y > min.y)
|
if (fabs(out.y) > min.y)
|
||||||
mvt->linear.y = out.y;
|
mvt->linear.y = out.y;
|
||||||
} else { {
|
// } else {
|
||||||
out.x = f.x(in.x);
|
out.x = f.x(in.x);
|
||||||
if (out.x > min.x)
|
if (fabs(out.x) > min.x)
|
||||||
mvt->linear.x = out.x;
|
mvt->linear.x = out.x;
|
||||||
}
|
// }
|
||||||
|
|
||||||
out.z = f.z(in.z);
|
out.z = f.z(in.z);
|
||||||
if (out.z > min.z)
|
if (fabs(out.z) > min.z)
|
||||||
mvt->linear.z = out.z;
|
mvt->linear.z = out.z;
|
||||||
|
|
||||||
out.th = f.th(in.th);
|
out.th = f.th(in.th);
|
||||||
if (out.th > min.th)
|
if (fabs(out.th) > min.th)
|
||||||
mvt->angular.z = out.th;
|
mvt->angular.z = out.th;
|
||||||
|
|
||||||
pub.publish(mvt);
|
pub.publish(mvt);
|
||||||
ROS_INFO("cmd published");
|
ROS_INFO("cmd published");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void reconfigure(const hand_control::Commander_atanConfig& c, const uint32_t& level)
|
void reconfigure(const hand_control::Commander_atanConfig& c, const uint32_t& level)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue