Leg_detector on ROSbot 2.0

Hello Husarions Users!

I’m writing my master’s thesis. I’m beginner user of ROS. I use Husarion ROSbot 2.0 (ROS Melodic). I’m trying to run leg_detector (http://wiki.ros.org/leg_detector) on this device. I want to tracking people using LiDAR. I cloned repository (GitHub - wg-perception/people) to my workspace. I added node of LiDAR to launch file (leg_detector.launch). I changed arg scan from scan:=base_scan to scan:=/scan.

leg_detector.launch:

include file=“$(find rplidar_ros)/launch/rplidar.launch”

node pkg=“leg_detector” type=“leg_detector” name=“leg_detector”

args=“scan:=/scan $(find leg_detector)/config/trained_leg_detector.yaml” output=“screen”

After the command: roslaunch leg_detector leg_detector.launch, I see following, cyclic error messages in terminal:

[ WARN] [1657705125.709984398]: MessageFilter [target=odom_combined ]: Dropped 100.00% of messages so far. Please turn the [ros.leg_detector.message_filter] rosconsole logger to DEBUG for more information.

and:

[ WARN] [1657707032.581360628]: Transform from imu_link to base_link was unavailable for the time requested. Using latest instead.

rqt_graph looks good, but at graph’s end is not topic with position of people. After command roslaunch people_velocity_tracker tracked_detector.launch, I see relevant topic, but first error message too. Topic is empty.

What am I doing wrong? I would really appreciate if anybody helps me.

Hi Adam.

Are you launching only the node for that package, or do you happen to launch the rest of the stack of the ROSbot?

It seems like you are missing other transforms for the rest of the system.

Best regards,
Krzysztof Wojciechowski.

Hi @Krzysztof_Woj

I pasted only part of launch file. In the picture you can see all nodes and topics.

Hi Adam.

Could you provide me with your TF tree?

Best regards,
Krzysztof Wojciechowski.

Hi @Krzysztof_Woj

of course

My guess is that those errors come from lack of frame odom_combined which is used by the package. Also, you don’t have the frame for laser scan. You could add:

<node pkg="tf" type="static_transform_publisher" name="laser_publisher" args="0 0 0.058 3.14159 0 0 base_link laser 100" />

to get the laser scan transformation.

For the odom_combined you can modify EKF package by changing this line to odom_combined:

Best regards,
Krzysztof Wojciechowski.

Hi @Krzysztof_Woj

I added mentioned line (exactly) to launch file. I changed .yaml file.

Now I get following error messages:

[ERROR] [1658736936.585785340]: Odometry message frame_id was odom, expected map or odom_combined

and cyclic:

[ WARN] [1658736936.633071226]: MessageFilter [target=odom_combined ]: Dropped 100.00% of messages so far. Please turn the [ros.leg_detector.message_filter] rosconsole logger to DEBUG for more information.

Thanks for your help.

Hi Adam.

I made a mistake and missed one line. In that YAML file, could you also change line 55 to odom_combined?

Hopefully, this will remove the first error.

Best regards,
Krzysztof Wojciechowski.

I changed line 55. Leg_detector is working (shows many false positives at this moment). I’m still getting warn messages:

At start:

[ WARN] [1658742930.320837359]: Could not obtain transform from odom to odom_combined. Error was “odom_combined” passed to lookupTransform argument target_frame does not exist.

Later, cyclic:

[ WARN] [1658742932.374362296]: Could not obtain transform from odom to odom_combined. Error was “odom” passed to lookupTransform argument source_frame does not exist.

In the picture you can see errors in RViz:

Hi Adam

The simple and kind of dirty walk around is to make transform from odom to odom_combined and to bring back the old configuration of EKF yaml file.

You can add transform:

<node pkg="tf" type="static_transform_publisher" name="odom_to_odom_combined_publisher" args="0 0 0 0 0 0 odom odom_combined 100" />

It’s not the best practice, but it might work. The other option is to either change odom_combined to odom frame in the whole leg detector package.

I forgot that odom frame is hard-coded in some places of our code. It is easier to make changes in the leg detector package or make that transform match rest of the system.

Best regards,
Krzysztof Wojciechowski.