Skip to content

Commit de734af

Browse files
committed
refine
1 parent 18892fd commit de734af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/msg_converter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ auto MsgConverter::init() -> bool {
5757
for (int i = 0; i < target_joint_to_inspect.size(); i++) {
5858
target_joint_to_inspect_.emplace_back(target_joint_to_inspect[i]);
5959
ros::Publisher publisher =
60-
nh_.advertise<std_msgs::Float32>("/" + std::string(target_joint_to_inspect[i]) + "/position", 1);
60+
nh_.advertise<std_msgs::Float32>("/" + std::string(target_joint_to_inspect[i]) + "/cmd/position", 1);
6161
inspected_joint_value_publishers_.push_back(publisher);
6262
}
6363
}
@@ -417,9 +417,12 @@ void MsgConverter::publishJointState(const sensor_msgs::JointState& src_msg,
417417
}
418418
auto target_name_in = findInVector<std::string>(target_joint_to_inspect_, target_names[i]);
419419
if (target_name_in.first) {
420+
ROS_WARN_STREAM(target_names[i].c_str() << " is in the joints to inspect");
420421
std_msgs::Float32 tgt_position;
421422
tgt_position.data = src_msg.position[result.second];
422423
inspected_joint_value_publishers_[target_name_in.second].publish(tgt_position);
424+
} else {
425+
ROS_WARN_STREAM(target_names[i].c_str() << " does not match");
423426
}
424427
} else {
425428
ROS_ERROR_STREAM(prefix << "Source joint name " << source_names[i]

0 commit comments

Comments
 (0)