Cannot move turtlebot3 burger
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Previn Savaya
am 28 Jul. 2019
Beantwortet: Previn Savaya
am 4 Aug. 2019
Lidar data works perfectly fine, however, I cannot move the bot. Can anyone see what I'm doing wrong?
Connectioin Info:
rosshutdown
setenv('ROS_MASTER_URI','http://10.0.0.4:11311')
setenv('ROS_IP','10.0.0.4')
rosinit('http://10.0.0.4:11311', 'NodeHost', '10.0.0.169')
Rostopic List
>> rostopic list
/battery_state
/cmd_vel
/cmd_vel_rc100
/diagnostics
/firmware_version
/imu
/joint_states
/magnetic_field
/motor_power
/odom
/reset
/rosout
/rosout_agg
/rpms
/scan
/sensor_state
/sound
/tf
/version_info
>>
Here is my script:
TurtleBot_Topic.vel = '/cmd_vel';
TurtleBot_Topic.laser = '/scan';
laser_sub = rossubscriber(TurtleBot_Topic.laser);
velocity_pub = rospublisher(TurtleBot_Topic.vel, 'geometry_msgs/Twist');
velocity_msg = rosmessage(velocity_pub);
tic
while toc<10
scan_data = receive(laser_sub);
cart = readCartesian(scan_data, 'RangeLimit', [0.12 3.5]);
plot(cart(:,1),cart(:,2), 'o');
velocity_msg.Angular.Z = 0.0;
velocity_msg.Linear.X = 0.2;
send(velocity_pub, velocity_msg);
end
All help is appreciated.
PS: I had a much more detailed report, pressed a wrong key and it all got deleted :(
6 Kommentare
Sai Bhargav Avula
am 1 Aug. 2019
Try echoing the /cmd_vel topic and check for the values.
vel_msg = rostopic("echo", /cmd_vel)
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Network Connection and Exploration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!