joshnewans / articubot_one

282 stars 248 forks source link

launch_robot.launch.py robot_description error #18

Closed 6APA6ALLlKA closed 10 months ago

6APA6ALLlKA commented 10 months ago

Good day, i'm launch robot-launch file on RPi4 and he is dont want to launch. I dont know why it happens, i tried a lot, but it doesnt work anyway. I think it because this code:

robot_description = ParameterValue(Command(['ros2 param get --hide-type /robot_state_publisher robot_description']), value_type=str)

    controller_params_file = os.path.join(get_package_share_directory(package_name),'config','my_controllers.yaml')

    controller_manager = Node(
        package="controller_manager",
        executable="ros2_control_node",
        parameters=[{'robot_description': robot_description},
                    controller_params_file]
    )

This what i get:

`[INFO] [launch]: Default logging verbosity is set to INFO [INFO] [robot_state_publisher-1]: process started with pid [10864] [robot_state_publisher-1] [INFO] [1701792210.594888781] [robot_state_publisher]: got segment base_footprint [robot_state_publisher-1] [INFO] [1701792210.595375938] [robot_state_publisher]: got segment base_link [robot_state_publisher-1] [INFO] [1701792210.595467455] [robot_state_publisher]: got segment camera_link [robot_state_publisher-1] [INFO] [1701792210.595503547] [robot_state_publisher]: got segment camera_link_optical [robot_state_publisher-1] [INFO] [1701792210.595535732] [robot_state_publisher]: got segment caster_wheel [robot_state_publisher-1] [INFO] [1701792210.595566046] [robot_state_publisher]: got segment chassis [robot_state_publisher-1] [INFO] [1701792210.595595842] [robot_state_publisher]: got segment laser_frame [robot_state_publisher-1] [INFO] [1701792210.595625601] [robot_state_publisher]: got segment left_wheel [robot_state_publisher-1] [INFO] [1701792210.595657859] [robot_state_publisher]: got segment right_wheel [INFO] [ros2_control_node-2]: process started with pid [10903] [INFO] [spawner-3]: process started with pid [10905] [INFO] [spawner-4]: process started with pid [10907] [ros2_control_node-2] [WARN] [1701792217.291444991] [controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead. [ros2_control_node-2] [INFO] [1701792217.292729153] [resource_manager]: Loading hardware 'RealRobot' [ros2_control_node-2] [INFO] [1701792217.310758087] [resource_manager]: Initialize hardware 'RealRobot'

[ros2_control_node-2] terminate called after throwing an instance of 'serial::IOException' `

Am i right, that [ros2_control_node-2] [WARN] [1701792217.291444991] [controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead. this string shows because he cant launch controller_manager node? Sorry for my bad english

I tried your articubot package, this also doesnt work

6APA6ALLlKA commented 10 months ago

i found this in controller_manager.cpp

 get_parameter("robot_description", robot_description_);
  if (robot_description_.empty())
  {
    subscribe_to_robot_description_topic();
  }
  else
  {
    RCLCPP_WARN(
      get_logger(),
      "[Deprecated] Passing the robot description parameter directly to the control_manager node "
      "is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead.");
    init_resource_manager(robot_description_);
  }