-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jazzy updates #229
Jazzy updates #229
Changes from 23 commits
3bb35cd
39fb2d4
4243451
134e3e1
5576839
aeb6b6e
b780095
f0a03cc
75888b6
fc68eb6
3cc9e19
9207bdc
c344de0
bada055
b1c8232
ac43b55
f34e8b3
990a68b
13f4ee0
c01cddf
1de4ba0
ccc4134
46bd4bd
7724184
ba07a50
f7bdf15
46865fe
cbe7a8e
4747b1b
edfc927
cc53fca
02be9b7
1b0ecf4
447f8f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ class MotionControlNode : public rclcpp::Node | |
void hazard_vector_callback(irobot_create_msgs::msg::HazardDetectionVector::ConstSharedPtr msg); | ||
|
||
/// \brief Callback for new velocity commands | ||
void commanded_velocity_callback(geometry_msgs::msg::Twist::ConstSharedPtr msg); | ||
void commanded_velocity_callback(geometry_msgs::msg::TwistStamped::ConstSharedPtr msg); | ||
|
||
/// \brief Callback for robot odometry | ||
void robot_pose_callback(nav_msgs::msg::Odometry::ConstSharedPtr msg); | ||
|
@@ -91,7 +91,7 @@ class MotionControlNode : public rclcpp::Node | |
void kidnap_callback(irobot_create_msgs::msg::KidnapStatus::ConstSharedPtr msg); | ||
|
||
/// \brief Given command, bound by max speed, checking each wheel | ||
void bound_command_by_limits(geometry_msgs::msg::Twist & cmd); | ||
void bound_command_by_limits(geometry_msgs::msg::TwistStamped & cmd); | ||
|
||
/// These robot services live in ui-mgr node on robot, but here for convenience | ||
enum ResponseStatus : bool | ||
|
@@ -106,10 +106,10 @@ class MotionControlNode : public rclcpp::Node | |
|
||
rclcpp::Subscription<irobot_create_msgs::msg::HazardDetectionVector>::SharedPtr | ||
hazard_detection_sub_; | ||
rclcpp::Subscription<geometry_msgs::msg::Twist>::SharedPtr teleop_subscription_; | ||
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr teleop_subscription_; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should keep both subscriptions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I've added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Users could have developed their own controller applications and may still be using the old data type There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fair. Though in the context of Jazzy I'd argue the correct solution is to require the custom controllers/applications to be updated to the new standard, rather than continuing to support the old one. Regardless, I've added the second subscription and it appears to be working correctly. |
||
rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr odom_pose_sub_; | ||
rclcpp::Subscription<irobot_create_msgs::msg::KidnapStatus>::SharedPtr kidnap_sub_; | ||
rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr cmd_vel_out_pub_; | ||
rclcpp::Publisher<geometry_msgs::msg::TwistStamped>::SharedPtr cmd_vel_out_pub_; | ||
rclcpp::Publisher<irobot_create_msgs::msg::HazardDetection>::SharedPtr backup_limit_hazard_pub_; | ||
rclcpp::Publisher<irobot_create_msgs::msg::WheelStatus>::SharedPtr wheel_status_pub_; | ||
rclcpp::TimerBase::SharedPtr control_timer_ {nullptr}; | ||
|
@@ -128,7 +128,7 @@ class MotionControlNode : public rclcpp::Node | |
std::shared_ptr<WallFollowBehavior> wall_follow_behavior_ {nullptr}; | ||
|
||
std::mutex mutex_; | ||
geometry_msgs::msg::Twist last_teleop_cmd_; | ||
geometry_msgs::msg::TwistStamped last_teleop_cmd_; | ||
rclcpp::Time last_teleop_ts_; | ||
rclcpp::Duration wheels_stop_threshold_; | ||
std::atomic<bool> allow_speed_param_change_ {false}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this addition? if we need it, we should also add it to the
package.xml
, but i don't see it being usedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a vestigial leftover from some earlier development that I reverted, though apparently incompletely. Fixed.