Running the grasp_object demo

Hi @sesem378, looking at the original warning “Could not get base to fixed frame transform […] when looking up transform from frame [base_link] to frame [odom]”, I’d like to see what’s happening there. As you may know, base_link is the robot’s first frame and every other frame on the robot is defined with respect to that link. The base_link is rigidly attached to the mobile base, in between the two wheels. The odom frame, as defined by REP 105, is fixed in the world and gives you an noisy estimate of where the robot has moved in the world. It’s the laser_scan_matcher_node’s job to publish the base_link to odom transform by looking at the 2D lidar and estimating how Stretch has moved. In grasp_object.launch, lines 29-31 include that node.

Could you run the following command to see if TF2 knows about a transform between base_link and odom:

rosrun tf tf_echo base_link odom

On my robot, the output looks like:

Output
$ rosrun tf tf_echo base_link odom
At time 1689029640.313
- Translation: [0.004, 0.001, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.002, 1.000]
            in RPY (radian) [0.000, 0.000, -0.004]
            in RPY (degree) [0.000, 0.000, -0.248]
At time 1689029641.038
- Translation: [0.004, 0.001, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.002, 1.000]
            in RPY (radian) [0.000, -0.000, -0.005]
            in RPY (degree) [0.000, -0.000, -0.269]
At time 1689029641.995
- Translation: [0.005, 0.001, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.003, 1.000]
            in RPY (radian) [0.000, -0.000, -0.005]
            in RPY (degree) [0.000, -0.000, -0.307]

Additionally, let’s verify that the laser_scan_matcher_node is alive using:

rosnode list

The output should be:

Output
$ rosnode list
/aggregator_node
/camera/realsense2_camera
/camera/realsense2_camera_manager
/configure_d435i
/d435i_accel_correction
/funmap
/grasp_object
/joint_state_publisher
/laser_filter
/laser_scan_matcher_node
/lidar_node
/robot_state_publisher
/rosout
/rviz_1689025409739790621
/stretch_driver