Skip to content
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

Merged
merged 4 commits into from
Oct 19, 2016
Merged

Conversation

haryngod
Copy link
Collaborator

Update joystick update dynamic configuration.

@@ -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);
Copy link
Member

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;
Copy link
Member

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.

@stonier
Copy link
Member

stonier commented Oct 18, 2016

Oh damn...I'm sorry. Open yocs should not depend on closed gopher. Aside from being a strange dependency, we can't then release it.

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>
Copy link
Member

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.

@haryngod
Copy link
Collaborator Author

@stonier I've fix them.

@haryngod
Copy link
Collaborator Author

Related PR:

@stonier stonier merged commit 05aab71 into yujinrobot:devel Oct 19, 2016
@stonier
Copy link
Member

stonier commented Oct 19, 2016

     _  _(o)_(o)_  _
   ._\`:_ F S M _:' \_,
       / (`---'\ `-.
    ,-`  _)    (_,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants