-
Notifications
You must be signed in to change notification settings - Fork 179
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
[joyop] update dynamic configuration #114
Conversation
@@ -246,6 +255,13 @@ void JoyOp::publish() | |||
} | |||
} | |||
|
|||
void JoyOp::reconfigCB(gopher_core_msgs::BagJoystickConfig &config, uint32_t level) | |||
{ | |||
ROS_INFO("Reconfigure joystick linear : %f, angular : %f", config.linear_scale, config.angular_scale); |
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.
Any ROS_INFO
comments should follow the format used in the rest of this cpp code, i.e.
ROS_INFO("JoyOp: ...")
@@ -41,6 +44,9 @@ class JoyOp | |||
bool enable_pressed_, disable_pressed_, deadman_pressed_, brake_pressed_, boost_active_, zero_twist_published_; | |||
int wait_for_connection_; /**< Time to wait for enable/disable topics in seconds (-1 to not wait). **/ | |||
ros::Timer timer_; | |||
|
|||
dynamic_reconfigure::Server<gopher_core_msgs::BagJoystickConfig> * dynamic_reconfigure_server; | |||
dynamic_reconfigure::Server<gopher_core_msgs::BagJoystickConfig>::CallbackType dynamic_reconfigure_callback; |
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.
Does this actually need to be a class variable? It never goes beyond the scope of the constructor.
Oh damn...I'm sorry. Open You'll have to move the dynamic reconfiguration file to yocs_msgs....that should have actually been obvious ;) |
@@ -11,6 +11,8 @@ | |||
#include <std_msgs/String.h> | |||
#include "boost/thread/mutex.hpp" | |||
#include "boost/thread/thread.hpp" | |||
#include <dynamic_reconfigure/server.h> | |||
#include <gopher_core_msgs/BagJoystickConfig.h> |
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.
This should be called JoystickConfig
, not BagJoystickConfig
. The configuration actually has nothing to do with bagging at all. Bagging is just an example user.
@stonier I've fix them. |
Related PR: |
|
Update joystick update dynamic configuration.