Reason given for shutdown: [new node registered with same name]
Hello Here is what I'm trying to : I'm using an rplidar, arduino connected to Raspberry with ROS kinetic, to do autonomous mapping and navigation.
First, i run the rplidar with
roslaunch rplidar_ros view_rplidar.launch
then , slam mapping with
roslaunch rplidar_ros view_slam.launch
then I used hector_exploration with
roslaunch hector_exploration_node exploration_planner.launch
Final, to publish the cmd_vel topic I run
rosrun hector_exploration_controller simple_exploration_controller
My question, when I try to send cmd_vel values to Arduino through this code below
#include <ArduinoHardware.h>
#include <ros.h>
#include <geometry_msgs/Twist.h>
ros::NodeHandle nh;
geometry_msgs::Twist msg;
ros::Publisher pub("cmd_vel", &msg);
void setup()
{
nh.initNode();
nh.advertise(pub);
} void loop()
{
pub.publish(&msg);
nh.spinOnce();
}
Once I run this code on arduino, my rplidar stop spinning and give me this error message
[ WARN] [1532545086.000125786]: Shutdown request received.
[ WARN] [1532545086.000656149]: Reason given for shutdown: [new node registered with same name]