Skip to content

Commit

Permalink
Merge pull request #248 from 321Aurora/imagetransmission
Browse files Browse the repository at this point in the history
Add the function of change position
  • Loading branch information
YoujianWu authored Jan 19, 2025
2 parents c5367f9 + c1d4a8f commit 1869916
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rm_common/include/rm_common/decision/command_sender.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,12 @@ class JointPositionBinaryCommandSender : public CommandSenderBase<std_msgs::Floa
msg_.data = off_pos_;
state = false;
}
void changePosition(double scale)
{
current_position_ = msg_.data;
change_position_ = current_position_ + scale * per_change_position_;
msg_.data = change_position_;
}
bool getState() const
{
return state;
Expand All @@ -664,7 +670,7 @@ class JointPositionBinaryCommandSender : public CommandSenderBase<std_msgs::Floa

private:
bool state{};
double on_pos_{}, off_pos_{};
double on_pos_{}, off_pos_{}, current_position_{}, change_position_{}, per_change_position_{ 0.05 };
};

class CardCommandSender : public CommandSenderBase<std_msgs::Float64>
Expand Down

0 comments on commit 1869916

Please sign in to comment.