3️⃣Hardware Integration
Launch the robot's motor and sensor drivers.
Run
rosnode list
to find the names of the ROS nodes of the drivers.Run
rosnode info <node>
, where <node> is the name of the nodes determined from step 2. Sample output:From the information displayed from running step 3, make sure that:
The robot motor driver node subscribes to the topic
/cmd_vel
for velocity commands.The Lidar driver node publishes laser data to the topic
/scan
If the topic names are not set as in step 4, remap them in the launch files of the drivers by adding a line in the launch files in the following format:
While the robot base and lidar are launched, run
rosrun rqt_tf_tree rqt_tf_tree
and check that the frames are linked in this order: odom → base_link → laser.If the frames of base_link and laser are not linked correctly, there are two options you can link them. You can select one of them. (Prefer use Broadcast a transformation)
Broadcast a transformation refer to this link.
Create static transformation. Add the following line in the launch file of the lidar drivers:
In “args”, x = 0.22, y = 0, z = 0.1397, yaw = 0, pitch = 0, roll = 0 for this example. This should provide a transformation between the base_link and laser frame If you use static transformation, there will be several issues, one of the most is localizer mode, the UI won't visualize a laser scan in localizer mode.
With the driver nodes running, run RVIZ using:
rosrun rviz rviz
, do the following checks:Laser data
("/scan")
can be seen and is orientated in the correct direction.Movement direction during teleoperation is correct.
Robot odometry
("/odom")
is updating correctly during teleoperation.
Last updated