ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

When bringing up ROS on a TurtleBot3 Lidar spins once and stops

asked 2019-09-16 13:40:01 -0600

pitosalas gravatar image

I have the same configuration on each of 6 TB3s. But one of them is giving me problems. I believe I have all the software exactly the same, as well as the hardware. Key word is "believe". On this one TB3 when I launch bringup I see the Lidar spin around 1 rotation and then stop. The console output all looks normal. Any ideas?

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch
... logging to /home/donatello/.ros/log/60cfcb6c-d8b0-11e9-b88f-b827eb8c90c5/roslaunch-donatello-3080.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://172.22.5.144:44741/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /turtlebot3_core/baud: 115200
 * /turtlebot3_core/port: /dev/ttyACM0
 * /turtlebot3_core/tf_prefix: 
 * /turtlebot3_lds/frame_id: base_scan
 * /turtlebot3_lds/port: /dev/ttyUSB0

NODES
  /
    turtlebot3_core (rosserial_python/serial_node.py)
    turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics)
    turtlebot3_lds (hls_lfcd_lds_driver/hlds_laser_publisher)

auto-starting new master
process[master]: started with pid [3090]
ROS_MASTER_URI=http://172.22.5.144:11311

setting /run_id to 60cfcb6c-d8b0-11e9-b88f-b827eb8c90c5
process[rosout-1]: started with pid [3103]
started core service [/rosout]
process[turtlebot3_core-2]: started with pid [3112]
process[turtlebot3_lds-3]: started with pid [3121]
process[turtlebot3_diagnostics-4]: started with pid [3122]
[INFO] [1568658770.612506]: ROS Serial Python Node
[INFO] [1568658770.650603]: Connecting to /dev/ttyACM0 at 115200 baud
[INFO] [1568658772.787400]: Note: publish buffer size is 1024 bytes
[INFO] [1568658772.794070]: Setup publisher on sensor_state [turtlebot3_msgs/SensorState]
[INFO] [1568658772.811534]: Setup publisher on firmware_version [turtlebot3_msgs/VersionInfo]
[INFO] [1568658772.881740]: Setup publisher on imu [sensor_msgs/Imu]
[INFO] [1568658772.891360]: Setup publisher on cmd_vel_rc100 [geometry_msgs/Twist]
[INFO] [1568658772.916308]: Setup publisher on odom [nav_msgs/Odometry]
[INFO] [1568658772.925447]: Setup publisher on joint_states [sensor_msgs/JointState]
[INFO] [1568658772.934480]: Setup publisher on battery_state [sensor_msgs/BatteryState]
[INFO] [1568658772.943534]: Setup publisher on magnetic_field [sensor_msgs/MagneticField]
[INFO] [1568658775.020810]: Setup publisher on /tf [tf/tfMessage]
[INFO] [1568658775.034724]: Note: subscribe buffer size is 1024 bytes
[INFO] [1568658775.036595]: Setup subscriber on cmd_vel [geometry_msgs/Twist]
[INFO] [1568658775.049962]: Setup subscriber on sound [turtlebot3_msgs/Sound]
[INFO] [1568658775.064455]: Setup subscriber on motor_power [std_msgs/Bool]
[INFO] [1568658775.077989]: Setup subscriber on reset [std_msgs/Empty]
[INFO] [1568658775.862380]: Setup TF on Odometry [odom]
[INFO] [1568658775.867922]: Setup TF on IMU [imu_link]
[INFO] [1568658775.873850]: Setup TF on MagneticField [mag_link]
[INFO] [1568658775.879245]: Setup TF on JointState [base_link]
[INFO] [1568658775.890412]: --------------------------
[INFO] [1568658775.896054]: Connected to OpenCR board!
[INFO] [1568658775.900610]: This core(v1.2.2) is compatible with TB3 Burger
[INFO] [1568658775.904266]: --------------------------
[INFO] [1568658775.907627]: Start Calibration of Gyro
[INFO] [1568658778.421419]: Calibration End
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2019-09-16 13:45:01 -0600

pitosalas gravatar image

updated 2019-09-25 17:23:50 -0600

I solved it myself. Let me describe the setup:

A turtlebot3 robot is running roscore on board + the rest of the basic ROS Stack. The robot has a domain name, say r1.brandeis.edu. On the robot,

  • ROS_MASTER_URI=http://r1.brandeis.edu:11311
  • ROS_HOSTNAME is set to r1.brandeis.edu.

A wifi connected laptop has

  • ROS_MASTER_URI=http://r1.brandeis.edu:11311
  • ROS_IP=ip-address-of-laptop

This set up works. The problem I had which seemed to be causing the failure was caused by not following that setup.

I remain confused about the interaction between ROS_IP and ROS_HOSTNAME. For example, if on the laptop I setup ROS_HOSTNAME=localhost, this does not work. Also if I have both ROS_HOSTNAME and ROS_IP this causes problems. So I believe I am close to having a robust configuration but there are some interactions which are confusing to me.

edit flag offensive delete link more

Comments

1

I solved it myself. Should I delete this question?

No? Why?

It's perfectly OK to answer your own question.

It would be great if you could expand a little on what you mean by "It turned out to be a mismatched ROS_MASTER_URI". More detailed answers will make it easier for future users to re-use those answers.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-17 02:41:52 -0600 )edit

@gvdhoorn see above :)

pitosalas gravatar image pitosalas  ( 2019-09-25 17:24:01 -0600 )edit
1

answered 2023-03-29 14:04:48 -0600

Mario Prats gravatar image

Also make sure you have the right permissions on /dev/ttyUSB0, e.g.:

sudo chmod a+rw /dev/ttyUSB0

edit flag offensive delete link more
0

answered 2022-06-29 23:49:17 -0600

SRY7 gravatar image

had the same issue, first, make sure all steps for configuration and setting the laser scanner is done, according to robotis emaual, then If lidar didn't work and did not start spinning, despite doing all steps mentioned above, check the USB configuration on the robot. Plug and unplug the USB, adding to that, sometimes the cause for this problem is using a USB hub, so unplug the USB hub.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-09-16 13:40:01 -0600

Seen: 641 times

Last updated: Mar 29 '23