0
$\begingroup$

Rosanswers logo

I have ROS Hydro. I installed the ROS wrapper for youbot, and when I run the hello world example, the base moves but the arm doesn't. I am trying to simulate it in gazebo. I did: roslaunch youbot_gazebo_robot youbot.launch then I did: rosrun youbot_ros_hello_world youbot_ros_hello_world I am also having error loading the urdf material but I don't think that is the reason.

I have tried giving: rostopic pub /arm_1/arm_controller/position_command brics_actuator/JointPositions '{positions:[ {joint_uri: arm_joint_1, unit: rad, value: 1.0}]}' but the arm doesn't move.

My output looks like this:

SUMMARY

PARAMETERS

  • /arm_1/arm_controller/constraints/arm_joint_1/goal
  • /arm_1/arm_controller/constraints/arm_joint_2/goal
  • /arm_1/arm_controller/constraints/arm_joint_3/goal
  • /arm_1/arm_controller/constraints/arm_joint_4/goal
  • /arm_1/arm_controller/constraints/arm_joint_5/goal
  • /arm_1/arm_controller/constraints/goal_time
  • /arm_1/arm_controller/gains/arm_joint_1/d
  • /arm_1/arm_controller/gains/arm_joint_1/i
  • /arm_1/arm_controller/gains/arm_joint_1/p
  • /arm_1/arm_controller/gains/arm_joint_2/d
  • /arm_1/arm_controller/gains/arm_joint_2/i
  • /arm_1/arm_controller/gains/arm_joint_2/p
  • /arm_1/arm_controller/gains/arm_joint_3/d
  • /arm_1/arm_controller/gains/arm_joint_3/i
  • /arm_1/arm_controller/gains/arm_joint_3/p
  • /arm_1/arm_controller/gains/arm_joint_4/d
  • /arm_1/arm_controller/gains/arm_joint_4/i
  • /arm_1/arm_controller/gains/arm_joint_4/p
  • /arm_1/arm_controller/gains/arm_joint_5/d
  • /arm_1/arm_controller/gains/arm_joint_5/i
  • /arm_1/arm_controller/gains/arm_joint_5/p
  • /arm_1/arm_controller/joints
  • /arm_1/arm_controller/type
  • /arm_1/gripper_controller/gains/gripper_finger_joint_l/d
  • /arm_1/gripper_controller/gains/gripper_finger_joint_l/p
  • /arm_1/gripper_controller/gains/gripper_finger_joint_r/d
  • /arm_1/gripper_controller/gains/gripper_finger_joint_r/p
  • /arm_1/gripper_controller/joints
  • /arm_1/gripper_controller/type
  • /gazebo_ros_control/pid_gains/caster_joint_bl/d
  • /gazebo_ros_control/pid_gains/caster_joint_bl/i
  • /gazebo_ros_control/pid_gains/caster_joint_bl/p
  • /gazebo_ros_control/pid_gains/caster_joint_br/d
  • /gazebo_ros_control/pid_gains/caster_joint_br/i
  • /gazebo_ros_control/pid_gains/caster_joint_br/p
  • /gazebo_ros_control/pid_gains/caster_joint_fl/d
  • /gazebo_ros_control/pid_gains/caster_joint_fl/i
  • /gazebo_ros_control/pid_gains/caster_joint_fl/p
  • /gazebo_ros_control/pid_gains/caster_joint_fr/d
  • /gazebo_ros_control/pid_gains/caster_joint_fr/i
  • /gazebo_ros_control/pid_gains/caster_joint_fr/p
  • /gazebo_ros_control/pid_gains/wheel_joint_bl/d
  • /gazebo_ros_control/pid_gains/wheel_joint_bl/i
  • /gazebo_ros_control/pid_gains/wheel_joint_bl/p
  • /gazebo_ros_control/pid_gains/wheel_joint_br/d
  • /gazebo_ros_control/pid_gains/wheel_joint_br/i
  • /gazebo_ros_control/pid_gains/wheel_joint_br/p
  • /gazebo_ros_control/pid_gains/wheel_joint_fl/d
  • /gazebo_ros_control/pid_gains/wheel_joint_fl/i
  • /gazebo_ros_control/pid_gains/wheel_joint_fl/p
  • /gazebo_ros_control/pid_gains/wheel_joint_fr/d
  • /gazebo_ros_control/pid_gains/wheel_joint_fr/i
  • /gazebo_ros_control/pid_gains/wheel_joint_fr/p
  • /joint_state_controller/publish_rate
  • /joint_state_controller/type
  • /robot_description
  • /robot_state_publisher/publish_frequency
  • /rosdistro
  • /rosversion
  • /use_sim_time
  • /world_description

NODES / arm_1_arm_controller_spawner (controller_manager/spawner) arm_1_gripper_controller_spawner (controller_manager/spawner) gazebo (gazebo_ros/gzserver) gazebo_gui (gazebo_ros/gzclient) gazebo_world_model (gazebo_ros/spawn_model) joint_state_controller_spawner (controller_manager/spawner) robot_state_publisher (robot_state_publisher/robot_state_publisher) spawn_robot (gazebo_ros/spawn_model)

auto-starting new master process[master]: started with pid [8103] ROS_MASTER_URI=http://localhost:11311

setting /run_id to e490f68e-0cb7-11e5-98e5-88532e128978 process[rosout-1]: started with pid [8116] started core service [/rosout] process[gazebo-2]: started with pid [8130] process[gazebo_gui-3]: started with pid [8136] process[gazebo_world_model-4]: started with pid [8144] Gazebo multi-robot simulator, version 1.9.6 Copyright (C) 2014 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

Gazebo multi-robot simulator, version 1.9.6 Copyright (C) 2014 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

process[spawn_robot-5]: started with pid [8147] process[joint_state_controller_spawner-6]: started with pid [8150] Msg Waiting for master.process[arm_1_arm_controller_spawner-7]: started with pid [8155] process[arm_1_gripper_controller_spawner-8]: started with pid [8176] spawn_model script started [ INFO] [1433641968.253334264]: Finished loading Gazebo ROS API Plugin. [ INFO] [1433641968.273961897]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... Msg Waiting for master Msg Connected to gazebo master @ http://127.0.0.1:11345 Msg Publicized address: 192.168.2.16 [INFO] [WallTime: 1433641968.479495] [0.000000] Loading model xml from ros parameter [INFO] [WallTime: 1433641968.494633] [0.000000] Waiting for service /gazebo/spawn_urdf_model process[robot_state_publisher-9]: started with pid [8196] spawn_model script started [INFO] [WallTime: 1433641968.678191] [0.000000] Controller Spawner: Waiting for service controller_manager/load_controller [INFO] [WallTime: 1433641968.797138] [0.000000] Loading model xml from ros parameter [INFO] [WallTime: 1433641968.805726] [0.000000] Waiting for service /gazebo/spawn_urdf_model

[INFO] [WallTime: 1433641968.886130] [0.000000] Controller Spawner: Waiting for service controller_manager/load_controller Msg Connected to gazebo master @ http://127.0.0.1:11345 Msg Publicized address: 192.168.2.16 [INFO] [WallTime: 1433641968.964569] [0.000000] Controller Spawner: Waiting for service controller_manager/load_controller [INFO] [WallTime: 1433641969.102605] [0.000000] Calling service /gazebo/spawn_urdf_model [INFO] [WallTime: 1433641969.110218] [0.000000] Calling service /gazebo/spawn_urdf_model [ INFO] [1433641969.187980454, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available. [INFO] [WallTime: 1433641969.296968] [0.027000] Spawn status: SpawnModel: Successfully spawned model Unhandled exception in thread started by sys.excepthook is missing lost sys.stderr [gazebo_world_model-4] process has finished cleanly log file: /home/truce/.ros/log/e490f68e-0cb7-11e5-98e5-88532e128978/gazebo_world_model-4*.log Warning [parser_urdf.cc:1010] multiple inconsistent <self_collide> exists due to fixed joint reduction overwriting previous value [false] with [true]. [ INFO] [1433641970.813915280, 0.924000000]: Laser Plugin (robotNamespace = /), Info: Using the 'robotNamespace' param: '/' [ INFO] [1433641970.814047014, 0.924000000]: Starting Laser Plugin (ns = /)! [ INFO] [1433641970.826072136, 0.924000000]: Laser Plugin (ns = /) <tf_prefix_>, set to "" [INFO] [WallTime: 1433641970.846541] [0.924000] Spawn status: SpawnModel: Successfully spawned model [ INFO] [1433641970.872939382, 0.924000000]: Physics dynamic reconfigure ready. Unhandled exception in thread started by sys.excepthook is missing lost sys.stderr [spawn_robot-5] process has finished cleanly log file: /home/truce/.ros/log/e490f68e-0cb7-11e5-98e5-88532e128978/spawn_robot-5*.log Warning [Visual.cc:774] Unable to get Material[youbot/Orange] for Geometry[youbot::wheel_link_bl::wheel_link_bl_visual. Object will appear white Warning [Visual.cc:774] Unable to get Material[youbot/Orange] for Geometry[youbot::wheel_link_br::wheel_link_br_visual. Object will appear white Warning [Visual.cc:774] Unable to get Material[youbot/DarkGrey] for Geometry[youbot::base_footprint::base_footprint_visual_arm_link_0. Object will appear white [ INFO] [1433641971.523676903, 0.924000000]: Loading gazebo_ros_control plugin [ INFO] [1433641971.523789435, 0.924000000]: Starting gazebo_ros_control plugin in namespace: / [ INFO] [1433641971.524898699, 0.924000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server. Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_2. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_3. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_4. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_5. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_6. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_7. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_8. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_9. Object will appear white Warning [Visual.cc:774] Unable to get Material[Gazebo/Gray] for Geometry[world::wall_1::wall_1_visual_wall_10. Object will appear white Warning [Visual.cc:774] Unable to get Material[youbot/Orange] for Geometry[youbot::wheel_link_fl::wheel_link_fl_visual. Object will appear white Warning [Visual.cc:774] Unable to get Material[youbot/Orange] for Geometry[youbot::wheel_link_fr::wheel_link_fr_visual. Object will appear white [ INFO] [1433641971.963397157, 0.924000000]: Loaded gazebo_ros_control. [INFO] [WallTime: 1433641971.988293] [0.943000] Controller Spawner: Waiting for service controller_manager/switch_controller [INFO] [WallTime: 1433641971.990211] [0.943000] Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [WallTime: 1433641971.993177] [0.946000] Loading controller: arm_1/gripper_controller [INFO] [WallTime: 1433641972.002525] [0.947000] Controller Spawner: Waiting for service controller_manager/switch_controller [INFO] [WallTime: 1433641972.005337] [0.948000] Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [WallTime: 1433641972.008869] [0.950000] Loading controller: joint_state_controller [INFO] [WallTime: 1433641972.210565] [1.128000] Controller Spawner: Waiting for service controller_manager/switch_controller [INFO] [WallTime: 1433641972.212911] [1.129000] Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [WallTime: 1433641972.216673] [1.133000] Loading controller: arm_1/arm_controller [INFO] [WallTime: 1433641972.235147] [1.152000] Controller Spawner: Loaded controllers: arm_1/gripper_controller [INFO] [WallTime: 1433641972.328324] [1.237000] Controller Spawner: Loaded controllers: joint_state_controller [INFO] [WallTime: 1433641972.630923] [1.519000] Controller Spawner: Loaded controllers: arm_1/arm_controller [INFO] [WallTime: 1433641972.631997] [1.520000] Started controllers: arm_1/gripper_controller [INFO] [WallTime: 1433641972.633040] [1.521000] Started controllers: joint_state_controller [INFO] [WallTime: 1433641972.635017] [1.522000] Started controllers: arm_1/arm_controller


Originally posted by Truce on ROS Answers with karma: 33 on 2015-06-06

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You are not able to simulate in Gazebo using youbot_ros_hello_world because that file is publishing arm and gripper data on the topic "arm_1/arm_controller/position_command" and "arm_1/gripper_controller/position_command" respectively (you could check this in youbot_ros_hello_world code) whereas no such topic exist while running simulation in Gazebo. You could check it by running following command:

//run gazebo:

$ roslaunch youbot_gazebo_robot youbot.launch

//check topics

$ rostopic list

Topics on which you need to publish data are as give below:

For arm: /arm_1/arm_controller/command

For gripper: /arm_1/gripper_controller/command

Also, these topics have different message type associated with it which could be checked using following command:

$ rostopic info <topic_name>  

You can check the data you need to publish for above msg type using following command:

$ rosmsg show <msg_type>

Hence, all you need to do is to publish right data in the format of message type associated with the right topic. Use the package given in the following link:

https://github.com/vijendra1125/youbot_gazebo_publisher


Originally posted by vijendra1125 with karma: 16 on 2017-02-06

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by alexisp on 2021-04-19:
You know how I can move the arm with python, please help me by explaining why I can't find information on how to fill all the parameters of joint_position

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.