ROBOTIS-GIT / turtlebot3

ROS packages for Turtlebot3
http://turtlebot3.robotis.com
Apache License 2.0
1.47k stars 1.01k forks source link

"Tried to publish before configured, topic id 131" #958

Open HomelyRollout opened 1 year ago

HomelyRollout commented 1 year ago

ISSUE TEMPLATE ver. 0.4.0

  1. Which TurtleBot3 platform do you use?

    • [X] Burger
    • [ ] Waffle
    • [ ] Waffle Pi
  2. Which ROS is working with TurtleBot3?

    • [ ] ROS 1 Kinetic Kame
    • [ ] ROS 1 Melodic Morenia
    • [X] ROS 1 Noetic Ninjemys
    • [ ] ROS 2 Dashing Diademata
    • [ ] ROS 2 Eloquent Elusor
    • [ ] ROS 2 Foxy Fitzroy
    • [ ] etc (Please specify your ROS Version here)
  3. Which SBC(Single Board Computer) is working on TurtleBot3?

    • [ ] Intel Joule 570x
    • [x] Raspberry Pi 3B+
    • [ ] Raspberry Pi 4
    • [ ] etc (Please specify your SBC here)
  4. Which OS you installed on SBC?

    • [ ] Raspbian distributed by ROBOTIS
    • [ ] Ubuntu MATE (16.04/18.04/20.04)
    • [x] Ubuntu preinstalled server (18.04/20.04)
    • [ ] etc (Please specify your OS here)
  5. Which OS you installed on Remote PC?

    • [ ] Ubuntu 16.04 LTS (Xenial Xerus)
    • [ ] Ubuntu 18.04 LTS (Bionic Beaver)
    • [ ] Ubuntu 20.04 LTS (Focal Fossa)
    • [ ] Windows 10
    • [ ] MAC OS X (Specify version)
    • [x] etc (Please specify your OS here)
  6. Specify the software and firmware version(Can be found from Bringup messages)

    • Software version: [x.x.x]
    • Firmware version: [x.x.x]
  7. Specify the commands or instructions to reproduce the issue.

    • HERE
  8. Copy and Paste the error messages on terminal.

    SUMMARY PARAMETERS

/rosdistro: noetic /rosversion: 1.15.11 /turtlebot3_core/baud: 115200 /turtlebot3_core/port: /dev/ttyACM0 /turtlebot3_core/tf_prefix: /turtlebot3_lds/frame_id: base_scan NODES / turtlebot3_core (rosserial_python/serial_node.py) turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics) turtlebot3_lds (ld08_driver/ld08_driver)

ROS_MASTER_URI=http://192.168.0.196:11311/

process[turtlebot3_core-1]: started with pid [2244] process[turtlebot3_lds-2]: started with pid [2245] process[turtlebot3_diagnostics-3]: started with pid [2246] /dev/ttyACM0 OpenCR Virtual ComPort in FS Mode /dev/ttyUSB0 CP2102 USB to UART Bridge Controller FOUND LiDAR_LD08 @port :/dev/ttyUSB0 [INFO] [1683900507.010733]: ROS Serial Python Node [INFO] [1683900507.050099]: Connecting to /dev/ttyACM0 at 115200 baud [INFO] [1683900509.170383]: Requesting topics… [INFO] [1683900509.360679]: Note: publish buffer size is 1024 bytes [INFO] [1683900509.368741]: Setup publisher on sensor_state [turtlebot3_msgs/SensorState] [INFO] [1683900509.386934]: Setup publisher on firmware_version [turtlebot3_msgs/VersionInfo] [INFO] [1683900509.769946]: Setup publisher on imu [sensor_msgs/Imu] [INFO] [1683900509.788884]: Setup publisher on cmd_vel_rc100 [geometry_msgs/Twist] [INFO] [1683900509.928308]: Setup publisher on odom [nav_msgs/Odometry] [INFO] [1683900509.947655]: Setup publisher on joint_states [sensor_msgs/JointState] [ERROR] [1683900509.959059]: Creation of publisher failed: Checksum does not match: 4ddae7f048e32fda22cac764685e3974,476f837fa6771f6e16e3bf4ef96f8770 [INFO] [1683900509.976326]: Setup publisher on magnetic_field [sensor_msgs/MagneticField] [INFO] [1683900509.994108]: Setup publisher on illuminance [sensor_msgs/Illuminance] [INFO] [1683900510.575230]: Setup publisher on /tf [tf/tfMessage] [INFO] [1683900510.600442]: Note: subscribe buffer size is 1024 bytes [INFO] [1683900510.608574]: Setup subscriber on cmd_vel [geometry_msgs/Twist] [INFO] [1683900510.632532]: Setup subscriber on sound [turtlebot3_msgs/Sound] [INFO] [1683900510.657214]: Setup subscriber on motor_power [std_msgs/Bool] [INFO] [1683900510.799895]: Setup subscriber on reset [std_msgs/Empty] [INFO] [1683900510.827401]: Setup subscriber on illuminance_topic [sensor_msgs/Illuminance] [INFO] [1683900512.516045]: Setup TF on Odometry [odom] [INFO] [1683900512.527190]: Setup TF on IMU [imu_link] [INFO] [1683900512.537803]: Setup TF on MagneticField [mag_link] [INFO] [1683900512.548656]: Setup TF on JointState [base_link] [ERROR] [1683900512.622545]: Tried to publish before configured, topic id 131 [INFO] [1683900512.630870]: Requesting topics… [INFO] [1683900515.182262]: Calibration End [INFO] [1683900515.281515]: Setup publisher on sensor_state [turtlebot3_msgs/SensorState] [INFO] [1683900515.293434]: Setup publisher on firmware_version [turtlebot3_msgs/VersionInfo] [INFO] [1683900515.304815]: Setup publisher on imu [sensor_msgs/Imu] [INFO] [1683900515.315969]: Setup publisher on cmd_vel_rc100 [geometry_msgs/Twist] [INFO] [1683900515.327994]: Setup publisher on odom [nav_msgs/Odometry] [INFO] [1683900515.339780]: Setup publisher on joint_states [sensor_msgs/JointState] [ERROR] [1683900515.351288]: Creation of publisher failed: Checksum does not match: 4ddae7f048e32fda22cac764685e3974,476f837fa6771f6e16e3bf4ef96f8770 [INFO] [1683900515.362460]: Setup publisher on magnetic_field [sensor_msgs/MagneticField] [INFO] [1683900515.373108]: Setup publisher on illuminance [sensor_msgs/Illuminance] [INFO] [1683900515.388594]: Setup publisher on /tf [tf/tfMessage] [ERROR] [1683900515.414794]: Tried to publish before configured, topic id 131 [INFO] [1683900515.423299]: Requesting topics… [ERROR] [1683900515.500528]: Tried to publish before configured, topic id 131 [INFO] [1683900515.508704]: Requesting topics… [ERROR] [1683900515.606293]: Tried to publish before configured, topic id 131 [INFO] [1683900515.614474]: Requesting topics… [ERROR] [1683900515.712783]: Tried to publish before configured, topic id 131 [INFO] [1683900515.721219]: Requesting topics… [ERROR] [1683900515.817456]: Tried to publish before configured, topic id 131 [INFO] [1683900515.826375]: Requesting topics… [ERROR] [1683900515.924927]: Tried to publish before configured, topic id 131 [INFO] [1683900515.933353]: Requesting topics… [ERROR] [1683900516.029583]: Tried to publish before configured, topic id 131 [INFO] [1683900516.038178]: Requesting topics… [ERROR] [1683900516.136255]: Tried to publish before configured, topic id 131 [INFO] [1683900516.144432]: Requesting topics… [ERROR] [1683900516.242981]: Tried to publish before configured, topic id 131 [INFO] [1683900516.255962]: Requesting topics… [ERROR] [1683900516.349010]: Tried to publish before configured, topic id 131 [INFO] [1683900516.359220]: Requesting topics… [ERROR] [1683900516.454101]: Tried to publish before configured, topic id 131 [INFO] [1683900516.462500]: Requesting topics… [ERROR] [1683900516.560683]: Tried to publish before configured, topic id 131 [INFO] [1683900516.569119]: Requesting topics… [ERROR] [1683900516.666463]: Tried to publish before configured, topic id 131 [INFO] [1683900516.675929]: Requesting topics… [ERROR] [1683900516.772262]: Tried to publish before configured, topic id 131 [INFO] [1683900516.780741]: Requesting topics… [ERROR] [1683900516.878323]: Tried to publish before configured, topic id 131 [INFO] [1683900516.886464]: Requesting topics… [ERROR] [1683900516.983977]: Tried to publish before configured, topic id 131 [INFO] [1683900516.992582]: Requesting topics… [ERROR] [1683900517.090626]: Tried to publish before configured, topic id 131 [INFO] [1683900517.099993]: Requesting topics… [ERROR] [1683900517.195957]: Tried to publish before configured, topic id 131 [INFO] [1683900517.204731]: Requesting topics… [ERROR] [1683900517.302357]: Tried to publish before configured, topic id 131 [INFO] [1683900517.311394]: Requesting topics… [ERROR] [1683900517.409309]: Tried to publish before configured, topic id 131 [INFO] [1683900517.417980]: Requesting topics… [ERROR] [1683900517.514630]: Tried to publish before configured, topic id 131 [INFO] [1683900517.522785]: Requesting topics… [ERROR] [1683900517.620395]: Tried to publish before configured, topic id 131 [INFO] [1683900517.628755]: Requesting topics… [ERROR] [1683900517.726996]: Tried to publish before configured, topic id 131 [INFO] [1683900517.736757]: Requesting topics… [ERROR] [1683900517.832256]: Tried to publish before configured, topic id 131 [INFO] [1683900517.841942]: Requesting topics… [ERROR] [1683900517.938394]: Tried to publish before configured, topic id 131 [INFO] [1683900517.946741]: Requesting topics… [ERROR] [1683900518.044103]: Tried to publish before configured, topic id 131 [INFO] [1683900518.052497]: Requesting topics… [ERROR] [1683900518.150921]: Tried to publish before configured, topic id 131 [INFO] [1683900518.159199]: Requesting topics… [ERROR] [1683900518.256355]: Tried to publish before configured, topic id 131 [INFO] [1683900518.268796]: Requesting topics… [ERROR] [1683900518.363236]: Tried to publish before configured, topic id 131 [INFO] [1683900518.372053]: Requesting topics… [ERROR] [1683900518.468915]: Tried to publish before configured, topic id 131 [INFO] [1683900518.477276]: Requesting topics… [ERROR] [1683900518.575635]: Tried to publish before configured, topic id 131 [INFO] [1683900518.583779]: Requesting topics… [ERROR] [1683900518.681004]: Tried to publish before configured, topic id 131 [INFO] [1683900518.688285]: Requesting topics… [ERROR] [1683900518.788034]: Tried to publish before configured, topic id 131 [INFO] [1683900518.796459]: Requesting topics… [ERROR] [1683900518.892877]: Tried to publish before configured, topic id 131 [INFO] [1683900518.901203]: Requesting topics… [ERROR] [1683900518.999357]: Tried to publish before configured, topic id 131 [INFO] [1683900519.007996]: Requesting topics… [ERROR] [1683900519.105942]: Tried to publish before configured, topic id 131 [INFO] [1683900519.114193]: Requesting topics… [ERROR] [1683900519.210918]: Tried to publish before configured, topic id 131 [INFO] [1683900519.219976]: Requesting topics… [ERROR] [1683900519.317809]: Tried to publish before configured, topic id 131 [INFO] [1683900519.325730]: Requesting topics… [ERROR] [1683900519.423393]: Tried to publish before configured, topic id 131 [INFO] [1683900519.431180]: Requesting topics… [ERROR] [1683900519.528815]: Tried to publish before configured, topic id 131 [INFO] [1683900519.537341]: Requesting topics… [ERROR] [1683900519.635484]: Tried to publish before configured, topic id 131 [INFO] [1683900519.643493]: Requesting topics… [ERROR] [1683900519.741331]: Tried to publish before configured, topic id 131 [INFO] [1683900519.750513]: Requesting topics… [ERROR] [1683900519.847476]: Tried to publish before configured, topic id 131 [INFO] [1683900519.856041]: Requesting topics… [ERROR] [1683900519.953346]: Tried to publish before configured, topic id 131 [INFO] [1683900519.961526]: Requesting topics… [ERROR] [1683900520.059836]: Tried to publish before configured, topic id 131 [INFO] [1683900520.068238]: Requesting topics… [ERROR] [1683900520.166660]: Tried to publish before configured, topic id 131 [INFO] [1683900520.175626]: Requesting topics… [ERROR] [1683900520.271887]: Tried to publish before configured, topic id 131 [INFO] [1683900520.280701]: Requesting topics… [ERROR] [1683900520.378589]: Tried to publish before configured, topic id 131 [INFO] [1683900520.387222]: Requesting topics… [ERROR] [1683900520.484359]: Tried to publish before configured, topic id 131 [INFO] [1683900520.493086]: Requesting topics… [ERROR] [1683900520.590338]: Tried to publish before configured, topic id 131 [INFO] [1683900520.601810]: Requesting topics… [ERROR] [1683900520.696205]: Tried to publish before configured, topic id 131 [INFO] [1683900520.707582]: Requesting topics… [ERROR] [1683900520.803065]: Tried to publish before configured, topic id 131 [INFO] [1683900520.811908]: Requesting topics… [ERROR] [1683900520.908197]: Tried to publish before configured, topic id 131 [INFO] [1683900520.916443]: Requesting topics… [ERROR] [1683900521.014306]: Tried to publish before configured, topic id 131 [INFO] [1683900521.022191]: Requesting topics… [ERROR] [1683900521.121219]: Tried to publish before configured, topic id 131 [INFO] [1683900521.129365]: Requesting topics… [ERROR] [1683900521.227399]: Tried to publish before configured, topic id 131 [INFO] [1683900521.235855]: Requesting topics… [ERROR] [1683900521.333848]: Tried to publish before configured, topic id 131 [INFO] [1683900521.341993]: Requesting topics… [ERROR] [1683900521.439842]: Tried to publish before configured, topic id 131 [INFO] [1683900521.448417]: Requesting topics… [ERROR] [1683900521.546689]: Tried to publish before configured, topic id 131 [INFO] [1683900521.556238]: Requesting topics… [ERROR] [1683900521.651885]: Tried to publish before configured, topic id 131 [INFO] [1683900521.660089]: Requesting topics… [ERROR] [1683900521.758190]: Tried to publish before configured, topic id 131 [INFO] [1683900521.766633]: Requesting topics… [ERROR] [1683900521.863825]: Tried to publish before configured, topic id 131 [INFO] [1683900521.872302]: Requesting topics… [ERROR] [1683900521.970611]: Tried to publish before configured, topic id 131 [INFO] [1683900521.979039]: Requesting topics… [ERROR] [1683900522.075222]: Tried to publish before configured, topic id 131 [INFO] [1683900522.085348]: Requesting topics… [ERROR] [1683900522.182034]: Tried to publish before configured, topic id 131 [INFO] [1683900522.191419]: Requesting topics… [ERROR] [1683900522.287741]: Tried to publish before configured, topic id 131 [INFO] [1683900522.296138]: Requesting topics… ^C[turtlebot3_diagnostics-3] killing on exit [turtlebot3_lds-2] killing on exit [turtlebot3_core-1] killing on exit [INFO] [1683900522.375562]: Sending tx stop request [INFO] [1683900522.383736]: shutdown hook activated ^C[turtlebot3_lds-2] escalating to SIGTERM

  1. Please describe the issue in detail.

I am currently unable to use the Roslaunch command with the current turtlebot_core program that I have. Is there any way I could fix this issue? I was thinking it may have something to do with the program itself, but I am not too sure...

HomelyRollout commented 1 year ago

Never mind. Was able to resolve the issue by following the steps on issue #768

HomelyRollout commented 1 year ago

It seems I was getting too ahead of myself. I am once again dealing with this same error again. I will paste the program I am running in this comment. I am trying to use a light sensor with my tb3 but I am having difficulties with accurately displaying the amount of light in the atmosphere.

include "turtlebot3_core_config.h"

/***

/***

ifdef DEBUG

if ((t-tTime[5]) >= (1000 / DEBUG_LOG_FREQUENCY)) { sendDebuglog(); tTime[5] = t; }

endif

// Send log message after ROS connection sendLogMsg();

// Receive data from RC100 bool clicked_state = controllers.getRCdata(goal_velocity_from_rc100); if (clicked_state == true)
tTime[6] = millis();

// Check push button pressed for simple test drive driveTest(diagnosis.getButtonPress(3000));

// Update the IMU unit sensors.updateIMU();

// TODO // Update sonar data // sensors.updateSonar(t);

// Start Gyro Calibration after ROS connection updateGyroCali(nh.connected());

// Show LED status diagnosis.showLedStatus(nh.connected());

// Update Voltage battery_state = diagnosis.updateVoltageCheck(setup_end);

// Update Illuminance with new data illum_msg.header.stamp = nh.now(); illum_msg.illuminance = int(&illum_msg);

// Call all the callbacks waiting to be called at that point in time nh.spinOnce();

// Wait the serial link time to process waitForSerialLink(nh.connected()); }

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

/***

HomelyRollout commented 1 year ago

Here is the "turtlebot3_core_config" program as well...

ifndef TURTLEBOT3_CORE_CONFIGH

define TURTLEBOT3_CORE_CONFIGH

// #define NOETIC_SUPPORT //uncomment this if writing code for ROS1 Noetic

include

include <ros/time.h>

include <std_msgs/Bool.h>

include <std_msgs/Empty.h>

include <std_msgs/Int32.h>

include <sensor_msgs/JointState.h>

include <geometry_msgs/Vector3.h>

include <tf/tf.h>

include <tf/transform_broadcaster.h>

include <nav_msgs/Odometry.h>

include <sensor_msgs/Illuminance.h>

include <turtlebot3_msgs/SensorState.h>

include <turtlebot3_msgs/Sound.h>

include <turtlebot3_msgs/VersionInfo.h>

include

include "turtlebot3_burger.h"

include

define FIRMWARE_VER "1.2.6"

define CONTROL_MOTOR_SPEED_FREQUENCY 30 //hz

define CONTROL_MOTOR_TIMEOUT 500 //ms

define IMU_PUBLISH_FREQUENCY 200 //hz

define CMD_VEL_PUBLISH_FREQUENCY 30 //hz

define DRIVE_INFORMATION_PUBLISH_FREQUENCY 30 //hz

define VERSION_INFORMATION_PUBLISH_FREQUENCY 1 //hz

define DEBUG_LOG_FREQUENCY 10 //hz

define BDPIN_LED_USER_1 23

define BDPIN_LED_USER_2 24

define BDPIN_LED_USER_3 25

define WHEEL_NUM 2

define LEFT 0

define RIGHT 1

define LINEAR 0

define ANGULAR 1

define DEG2RAD(x) (x 0.01745329252) // PI/180

define RAD2DEG(x) (x 57.2957795131) // 180/PI

define TICK2RAD 0.001533981 // 0.087890625[deg] * 3.14159265359 / 180 = 0.001533981f

define TEST_DISTANCE 0.300 // meter

define TEST_RADIAN 3.14 // 180 degree

// #define DEBUG

define DEBUG_SERIAL SerialBT2

// Callback function prototypes void commandVelocityCallback(const geometry_msgs::Twist& cmd_vel_msg); void soundCallback(const turtlebot3_msgs::Sound& sound_msg); void motorPowerCallback(const std_msgs::Bool& power_msg); void resetCallback(const std_msgs::Empty& reset_msg);

// Function prototypes void publishCmdVelFromRC100Msg(void); void publishImuMsg(void); void publishMagMsg(void); void publishSensorStateMsg(void); void publishVersionInfoMsg(void); void publishBatteryStateMsg(void); void publishDriveInformation(void); void publishIlluminanceMsg(void);

ros::Time rosNow(void); ros::Time addMicros(ros::Time & t, uint32_t _micros); // deprecated

void updateVariable(bool isConnected); void updateMotorInfo(int32_t left_tick, int32_t right_tick); void updateTime(void); void updateOdometry(void); void updateJoint(void); void updateTF(geometry_msgs::TransformStamped& odom_tf); void updateGyroCali(bool isConnected); void updateGoalVelocity(void); void updateTFPrefix(bool isConnected); void illumCallback(const sensor_msgs::Illuminance& illum_msg); void illuminanceCallback(const sensor_msgs::Illuminance& illuminance_msg);

void initOdom(void); void initJointStates(void);

bool calcOdometry(double diff_time);

void sendLogMsg(void); void waitForSerialLink(bool isConnected);

/***

/***

char odom_header_frame_id[30]; char odom_child_frame_id[30];

char imu_frame_id[30]; char mag_frame_id[30];

char joint_state_header_frame_id[30];

/***

ros::Subscriber sound_sub("sound", soundCallback);

ros::Subscriber motor_power_sub("motor_power", motorPowerCallback);

ros::Subscriber reset_sub("reset", resetCallback);

ros::Subscriber Illuminance_sub("sensor_msgs", &illuminanceCallback);

/***

// Version information of Turtlebot3 turtlebot3_msgs::VersionInfo version_info_msg; ros::Publisher version_info_pub("firmware_version", &version_info_msg);

// IMU of Turtlebot3 sensor_msgs::Imu imu_msg; ros::Publisher imu_pub("imu", &imu_msg);

// Command velocity of Turtlebot3 using RC100 remote controller geometry_msgs::Twist cmd_vel_rc100_msg; ros::Publisher cmd_vel_rc100_pub("cmd_vel_rc100", &cmd_vel_rc100_msg);

// Odometry of Turtlebot3 nav_msgs::Odometry odom; ros::Publisher odom_pub("odom", &odom);

// Joint(Dynamixel) state of Turtlebot3 sensor_msgs::JointState joint_states; ros::Publisher joint_states_pub("joint_states", &joint_states);

// Battey state of Turtlebot3

if defined NOETIC_SUPPORT

sensor_msgs::BatteryStateNoetic battery_state_msg;

else

sensor_msgs::BatteryState battery_state_msg;

endif

ros::Publisher battery_state_pub("battery_state", &battery_state_msg);

// Magnetic field sensor_msgs::MagneticField mag_msg; ros::Publisher mag_pub("magnetic_field", &mag_msg);

// Illuminance sensor_msgs::Illuminance illum_msg; ros::Publisher Illuminance_pub("sensor_msgs", &illum_msg); /***

/***

/***

/***

/***

/***

/***

/***

/***

/***

endif // TURTLEBOT3_CORE_CONFIGH

HomelyRollout commented 1 year ago

And here are the two error messages I have received when I ran these programs using the bringup section of the e-manual

[ERROR] [1684249611.399670]: Creation of publisher failed: Checksum does not match: 4ddae7f048e32fda22cac764685e3974,476f837fa6771f6e16e3bf4ef96f8770

[ERROR] [1684249614.437176]: Tried to publish before configured, topic id 131

nishanth-rajkumar commented 1 year ago

Hey did you get a solution?

ROBOTIS-Will commented 1 year ago

If Arduino OpenCR package version is not the latest, you may get the Checksum error. Make sure to update the OpenCR package to the latest (1.5.2) and see if this fixes the Checksum issue.

tainguyenvanhachix commented 1 year ago

Sorry, I have the same error. Where is the latest OpenCR-Binaries package for turtlebot3 ROS1. I used this one, https://github.com/ROBOTIS-GIT/OpenCR-Binaries/raw/master/turtlebot3/ROS1/latest/opencr_update.tar.bz2

update: My error because of I use: $ export OPENCR_MODEL=waffle But if I use (the same with tutorials) it solve the error: $ export OPENCR_MODEL=waffle_noetic