ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

asked 2015-03-03 17:36:09 -0600

crazymumu gravatar image

updated 2015-03-04 02:14:16 -0600

gvdhoorn gravatar image
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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-03-03 23:39:35 -0600

ahendrix gravatar image

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.

edit flag offensive delete link more

Comments

http://www.generationrobots.com/en/co... ; 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.

crazymumu gravatar image crazymumu  ( 2015-03-03 23:55:22 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-03 17:36:09 -0600

Seen: 1,146 times

Last updated: Mar 04 '15