-
Notifications
You must be signed in to change notification settings - Fork 0
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
Onboarding/sergmister #1
base: main
Are you sure you want to change the base?
Conversation
@@ -9,19 +9,31 @@ std_msgs::String motorString; | |||
|
|||
// Create your callback function for your publisher that takes in the std_msgs::Int32 message as a ConstPtr, | |||
// sets motorString.data, and publishes motorString. | |||
void moveCallback(const std_msgs::Int32::ConstPtr &x_msg) { | |||
int x = x_msg->data; |
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.
Could just use the pointer but creating this variable works too.
ros::init(argc, argv, "control"); | ||
ros::NodeHandle nh; | ||
// Declare the motor publisher here that publishes a std_msgs::String to "/jetbot_motors/cmd_str" | ||
|
||
motor_pub = nh.advertise<std_msgs::String>("/jetbot_motors/cmd_str", 10); |
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 reasoning behind a message queue size of 10?
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.
I thought that if I were to send a stop message while python was backlogged that the robot would never receive that stop message. For something like this it prob makes zero difference.
No description provided.