I try to understand the ros2_control on differential drive hardware interface from demo code. I already send cmd_val for move the robot , and it move in rviz2. My problem is I find the log code for example like below, but none of the log show in terminal, there any setup that I need to configure to make the log show into the terminal? I have notice by change the code in ros2_control_demo_hardware/src/diffbot_system.cpp:- comment the code in read and write function did not give any effect to it.....I still can control the robot model in rviz2 by using cmd_val.... please advice
RCLCPP_INFO(
rclcpp::get_logger("DiffBotSystemHardware"),
"Got position state %.5f and velocity state %.5f for '%s'!", hw_positions_[i],
hw_velocities_[i], info_.joints[i].name.c_str());
The output in terminal is show below. Any info please advice.
shahrol@cloud001:~/ros2control_ws$ ros2 launch ros2_control_demo_bringup diffbot_system.launch.py
[INFO] [launch]: All log files can be found below /home/shahrol/.ros/log/2021-08-22-16-21-04-744139-cloud001-134924
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [134928]
[INFO] [ros2_control_node-2]: process started with pid [134930]
[INFO] [spawner.py-3]: process started with pid [134932]
[INFO] [spawner.py-4]: process started with pid [134934]
[robot_state_publisher-1] Parsing robot urdf xml string.
[robot_state_publisher-1] The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.
[robot_state_publisher-1] Link caster_frontal_wheel had 0 children
[robot_state_publisher-1] Link caster_rear_wheel had 0 children
[robot_state_publisher-1] Link left_wheel had 0 children
[robot_state_publisher-1] Link right_wheel had 0 children
[robot_state_publisher-1] [INFO] [1629620465.260133412] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1629620465.260239956] [robot_state_publisher]: got segment caster_frontal_wheel
[robot_state_publisher-1] [INFO] [1629620465.260257605] [robot_state_publisher]: got segment caster_rear_wheel
[robot_state_publisher-1] [INFO] [1629620465.260270296] [robot_state_publisher]: got segment left_wheel
[robot_state_publisher-1] [INFO] [1629620465.260287220] [robot_state_publisher]: got segment right_wheel
[ros2_control_node-2] [INFO] [1629620465.284592757] [controller_manager]: update rate is 100 Hz
[spawner.py-4] [INFO] [1629620465.535399234] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-3] [INFO] [1629620465.557948856] [spawner_diffbot_base_controller]: Waiting for /controller_manager services
[ros2_control_node-2] [INFO] [1629620465.742730985] [controller_manager]: Loading controller 'joint_state_broadcaster'
[spawner.py-4] [INFO] [1629620465.760737880] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ros2_control_node-2] [INFO] [1629620465.762902101] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[ros2_control_node-2] [INFO] [1629620465.766650485] [controller_manager]: Loading controller 'diffbot_base_controller'
[spawner.py-3] [INFO] [1629620465.780861909] [spawner_diffbot_base_controller]: Loaded diffbot_base_controller
[ros2_control_node-2] [INFO] [1629620465.800242009] [controller_manager]: Configuring controller 'diffbot_base_controller'
[spawner.py-4] [INFO] [1629620465.801521326] [spawner_joint_state_broadcaster]: Configured and started joint_state_broadcaster
[spawner.py-3] [INFO] [1629620465.821667248] [spawner_diffbot_base_controller]: Configured and started diffbot_base_controller
[INFO] [spawner.py-4]: process has finished cleanly [pid 134934]
[INFO] [spawner.py-3]: process has finished cleanly [pid 134932]
Originally posted by shahrol.baharom on ROS Answers with karma: 76 on 2021-08-22
Post score: 1
Original comments
Comment by Darkproduct on 2021-08-24:
What exactly do you want to archive? Do you use Gazebo or do you run the code on a real robot?
Comment by shahrol.baharom on 2021-08-24:
Hi, I would like to run the code on real robot..... hope you can help me in the process