Turtlebot wont move (MATLAB)
Hi I'm trying to run some very basic code to move my turtlebot.
i am using ROS Indigo on Ubuntu 14.04.2
I am communicating through MATLAB and I should have everything setup fine(keyword should).
turtlebot ip 192.168.3.139 matlab ip 192.168.3.149
They ping each other fine
My matlab code is this:
robot = rospublisher('/mobile_base/commands/velocity')
velmsg = rosmessage(robot)
velmsg.Linear.X = .1
send( robot , velmsg )
this is after running rosinit to 192.168.3.139 I get
Initializing global node /matlab_global_node_99074 with NodeURI http://192.168.3.149:5587/
I have setup the bashrc as such
echo export ROS_HOSTNAME=192.168.3.139 >> ~/.bashrc
echo export ROS_MASTER_URI=http://192.168.3.139:11311 >> ~/.bashrc
sudo sh -c 'ROS_HOSTNAME=192.168.3.139 >> /opt/ros/indigo/setup.bash'
i double checked my bashrc and the env variables are there.
turtlebot moves with keyboard operation fine.
Quick note** I had all this working fine on one laptop, came back to try on a different laptop, didn't work anymore.
I am really not sure what i am missing. i have spent about a week searching for answers.
quick overview of what i do.
roscore
new terminal
roslaunch turtlebot.bringup minimal.launch
turtelbot beeps run the code on matlab no errors on matlab side
turtlebot doesn't move... it is supposed to lurch forward really quick and stop. I have seen this exact code work(matlab)
when i run rostopic list i see all the commands (including velocity)
I am unsure where to look or find issues. I am assuming the turtlebot isn't receiving the commands?
Any help would be wonderful since i am getting zero errors anywhere
Thanks! (also pretty new to Linux, sorry if i ask for simple clarifications)
UPDATE10/12/17:
I just tried to some communications test bewteen the turtlebot and the matlab computer: I WAS able to recieve scan data from the turtlebot but still NOT able to move the turtlebot
my 'rostopic' list contains
/cmd_vel_mux/active
/cmd_vel_mux/input/navi
/cmd_vel_mux/input/safety_controller
/cmd_vel_mux/input/teleop
/cmd_vel_mux/parameter
/mobile_base/commands/motor_power
/mobile_base/commands/motor_power
/mobile_base/commands/reset_odometry
/mobile_base/commands/sound
/mobile_base/commands/velocity
(only posted ones that are relevant to movement/question)
after doing some more research i found a hand tool called 'roswtf'
another question made mention of getting similar errors https://answers.ros.org/question/2998...
I also have
* /mobile_base_nodelet_manager:
* /mobile_base/commands/controller_info
* /mobile_base/commands/external_power
* /mobile_base/commands/reset_odometry
* /mobile_base/commands/sound
* /cmd_vel_mux/input/safety_controller
* /cmd_vel_mux/input/navi
* /mobile_base/commands/digital_output
* /mobile_base/commands/led1
* /mobile_base/commands/led2
* /mobile_base/commands/motor_power
I have no issue using teleop but I'm wondering if our issues could be related.
Also I found some more info about '/mobile_base/commands/velocity' through matlab.
Publisher with properties:
TopicName: '/mobile_base/commands/velocity'
IsLatching: 1
NumSubscribers: 0
MessageType: 'geometry_msgs/Twist'
ROS Twist message with properties:
MessageType: 'geometry_msgs/Twist'
Linear: [1×1 Vector3]
Angular: [1×1 Vector3]
rostopic info '/mobile_base/commands/velocity'
Type: geometry_msgs ...
It may be a network issue. Can you update your question to include the env variables (
ROS_MASTER
,ROS_IP
if you're using IP's orROS_HOSTNAME
you're using host names) for the computers that you're using?