Robotics StackExchange | Archived questions

rostopic send msgs to robot in ros control of gazebo didn't work

n@lin-VirtualBox:~$ rostopic list   
/clock   
/gazebo/linkstates   
/gazebo/modelstates  
/gazebo/parameterdescriptions  
/gazebo/parameterupdates  
/gazebo/setlinkstate  
/gazebo/setmodelstate  
/linrobot/jointstates  
/linrobot/leftWheeleffortcontroller/command  
/linrobot/rightWheeleffortcontroller/command  
/rosout  
/rosoutagg  
/tf  

Then:

lin@lin-VirtualBox:~$ rostopic pub -1 /linrobot/leftWheeleffortcontroller/command std_msgs/Float64 "data: 1.5"  
publishing and latching message for 3.0 seconds  
lin@lin-VirtualBox:~$ 

I am using ros_contol to control my robot move. I roslaunch the file, no error. but send command with the topic i have, but the robot didn't move.
thanks for help, all.

lin@lin-VirtualBox:~$ roslaunch linrobot_gazebo linrobot_world.launch   
... logging to /home/lin/.ros/log/3c481948-c235-11e4-96b7-080027431ac5/roslaunch-lin-VirtualBox-2401.log  
Checking log directory for disk usage. This may take awhile.  
Press Ctrl-C to interrupt  
Done checking log file disk usage. Usage is <1GB.  

started roslaunch server http://lin-VirtualBox:33587/  

SUMMARY  
========  

PARAMETERS  
 * /linrobot/joint_state_controller/publish_rate: 50  
 * /linrobot/joint_state_controller/type: joint_state_contr...  
 * /linrobot/leftWheel_effort_controller/joint: left_wheel_hinge  
 * /linrobot/leftWheel_effort_controller/pid/d: 10.0  
 * /linrobot/leftWheel_effort_controller/pid/i: 0.1  
 * /linrobot/leftWheel_effort_controller/pid/p: 100.0  
 * /linrobot/leftWheel_effort_controller/type: effort_controller...  
 * /linrobot/rightWheel_effort_controller/joint: right_wheel_hinge  
 * /linrobot/rightWheel_effort_controller/pid/d: 10.0  
 * /linrobot/rightWheel_effort_controller/pid/i: 0.1  
 * /linrobot/rightWheel_effort_controller/pid/p: 100.0  
 * /linrobot/rightWheel_effort_controller/type: effort_controller...  
 * /robot_description: <?xml version="1....  
 * /robot_state_publisher/robot_description: <?xml version="1....  
 * /rosdistro: indigo  
 * /rosversion: 1.11.10  
 * /use_sim_time: True  

NODES  
  /linrobot/  
    controller_spawner (controller_manager/spawner)  
  /  
    gazebo (gazebo_ros/gzserver)  
    gazebo_gui (gazebo_ros/gzclient)  
    linrobot_spawn (gazebo_ros/spawn_model)  
    robot_state_publisher (robot_state_publisher/robot_state_publisher)  

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

setting /run_id to 3c481948-c235-11e4-96b7-080027431ac5  
process[rosout-1]: started with pid [2432]  
started core service [/rosout]  
process[gazebo-2]: started with pid [2435]  
process[gazebo_gui-3]: started with pid [2439]  
process[linrobot_spawn-4]: started with pid [2457]  
process[linrobot/controller_spawner-5]: started with pid [2469]  
process[robot_state_publisher-6]: started with pid [2474]  
/opt/ros/indigo/lib/robot_state_publisher/robot_state_publisher  
[INFO] [WallTime: 1425449466.678620] [0.000000] Controller Spawner: Waiting for service   controller_manager/load_controller  
Gazebo multi-robot simulator, version 2.2.3  
Copyright (C) 2012-2014 Open Source Robotics Foundation.  
Released under the Apache 2 License.  
http://gazebosim.org  

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

Msg Waiting for master  
Msg Connected to gazebo master @ http://127.0.0.1:11345  
Msg Publicized address: 10.0.2.15  
[ INFO] [1425449467.505982790]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...  
[ INFO] [1425449467.521329634]: Finished loading Gazebo ROS API Plugin.  
Msg Waiting for master  
Msg Connected to gazebo master @ http://127.0.0.1:11345  
Msg Publicized address: 10.0.2.15  
libGL error: pci id for fd 19: 80ee:beef, driver (null)  
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.  
libGL error: core dri or dri2 extension not found  
libGL error: failed to load driver: vboxvideo  
spawn_model script started  
[INFO] [WallTime: 1425449468.243128] [0.000000] Loading model xml from ros parameter  
[INFO] [WallTime: 1425449468.245835] [0.000000] Waiting for service /gazebo/spawn_urdf_model  
Warning [gazebo.cc:215] Waited 1seconds for namespaces.  
[INFO] [WallTime: 1425449468.549756] [0.000000] Calling service /gazebo/spawn_urdf_model  
[ INFO] [1425449468.675929834, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.  
libGL error: pci id for fd 10: 80ee:beef, driver (null)  
[INFO] [WallTime: 1425449468.757180] [0.037000] Spawn status: SpawnModel: Successfully spawned model  
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.  
libGL error: core dri or dri2 extension not found  
libGL error: failed to load driver: vboxvideo  
[ INFO] [1425449468.788502642, 0.037000000]: Physics dynamic reconfigure ready.  
[ INFO] [1425449468.807590669, 0.037000000]: Loading gazebo_ros_control plugin  
[ INFO] [1425449468.807806559, 0.037000000]: Starting gazebo_ros_control plugin in namespace: /linrobot  
[ INFO] [1425449468.809147570, 0.037000000]: gazebo_ros_control plugin is waiting for model URDF in parameter   [/robot_description] on the ROS param server.  
[linrobot_spawn-4] process has finished cleanly  
log file: /home/lin/.ros/log/3c481948-c235-11e4-96b7-080027431ac5/linrobot_spawn-4*.log  
[ INFO] [1425449469.221115077, 0.037000000]: Loaded gazebo_ros_control.  
[INFO] [WallTime: 1425449469.399736] [0.194000] Controller Spawner: Waiting for service   controller_manager/switch_controller  
[INFO] [WallTime: 1425449469.402270] [0.196000] Controller Spawner: Waiting for service   controller_manager/unload_controller  
[INFO] [WallTime: 1425449469.404285] [0.199000] Loading controller: joint_state_controller  
[INFO] [WallTime: 1425449469.600347] [0.369000] Loading controller: rightWheel_effort_controller  
[INFO] [WallTime: 1425449469.747560] [0.500000] Loading controller: leftWheel_effort_controller  
[INFO] [WallTime: 1425449469.765846] [0.510000] Controller Spawner: Loaded controllers: joint_state_controller,   rightWheel_effort_controller, leftWheel_effort_controller  
[INFO] [WallTime: 1425449469.772571] [0.511000] Started controllers: joint_state_controller, rightWheel_effort_controller, leftWheel_effort_controller  

Asked by crazymumu on 2015-03-03 18:36:09 UTC

Comments

Answers

Are you following a tutorial? If you are, please update your question to include a link to the tutorial.

Have you tried using a larger effort value? Try an effort of 15 or 150.

I don't see anything obviously wrong with the configuration that you show, but you don't include your controller parameters. If your controllers aren't tuned properly, they probably won't issue the proper torque to the joint. You may want to edit your question to include your controller parameters.

Asked by ahendrix on 2015-03-04 00:39:35 UTC

Comments

http://www.generationrobots.com/en/content/75-gazebo-and-ros#TOC; This is the tutorial link; I try the value 100, didn't work. What's controller parameters do you mean? I add the control parameters pid(10,.0,100), is that ok? Thanks for your help.

Asked by crazymumu on 2015-03-04 00:55:22 UTC