hi all,
after googling alot, and really confusing, finally i found rosserial package which is my best bet to go for building my first robot from the scratch using ROS.
link: http://wiki.ros.org/rosserial
my NUC now installed with ubuntu 18.04. i'm considering to install ROS kinetic or melodic coz i'm really new to this field. probably i will go with kinetic coz roboware provide a nice IDE for a beginner like me.
my basic problem, i'm sorry if i'm asking this very basic and old fashioned question:
**is my choice for using rosserial package correct to interface the BLDC controller to drive the motors?**
i have 1 BLDC controller, 24/48V, 50A, dual channel, support CANopen and RS232 through USB. the fty gave me the PDF files for CANopen protocol and RS232, so i understand for command A will result a reply or result a specific action
(such as !p 1 10000 will produce motor channel 1 move forward CW 10,000 ticks. the motor is 200W BLDC with 2500PPR optical encoder).
that's very promising for a beginner as that protocol enable an idiot like me to drive the motor using shell/bash script by accessing the port, sending text command, and read the string reply if any.
so what should i do next to jump with ROS?
modifying rosserial? or writing all those commands in somewhere?
or using socketcan?
or worst, i have to go through hard way, using serial (not rosserial) and create a HW driver for ros?
please kindly give me a clue or guide which steps i should go.
many thx in advance
↧
using rosserial for interfacing to BLDC controller
↧
Unable to sync with device [XBees, ROS Serial]
Hi, I was trying to complete the tutorial "An example of ROS serial netwrok" but when I'm in the step of connect the xbees I get this error:
[INFO] [1529324674.474169]: Requesting topics...
[ERROR] [1529324689.479008]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
I have tested the xbees with XCTU so I know they work, but with ROS I have this problem. I have Melodic, and I have tried in Lunar too but nothing. I couldn't find a solution in the other question so if you can help me I would be very nice. Thanks.
↧
↧
publish visualization_msgs/Marker.h with rosserial.
I'm trying to publish marker to rviz with rosserial. I use Arduino Mega 2560 , ubuntu 14.04 and ROS indigo. in every time I run the arduino node after uploading the code on arduino board, an error "[ERROR] [WallTime: 1529597748.845483] Tried to publish before configured, topic id 125
" appers. this is the code I use https://github.com/toqaelshahat/marker/blob/master/marker.ino
why does this error appear and how to handle it and what is the wrong with the code ?
↧
Is the rosseral_xbee package compatible to ROS Kinetic?
I am using ROS kinetic, and I am running Ubuntu 16.04 LTS.
I want to sent digital data (pairs of numbers in fixed frequency), from my PC (with ROS) to an XBee.
I tried to download and setup the rosserial_xbee package from http://wiki.ros.org/rosserial_xbee.
The source link https://github.com/ros-drivers/rosserial was for jade-devel distro by default and there was not the kinetic option in the drop-down menu. I downloaded the jade-devel version. Is this package compatible for ROS kinetic? If it's not, how can I find a compatible package?
I didn't find any errors during the downloading process. How can I be sure that the package was correctly downloaded and installed?
↧
rosserial Teensy bluetooth problem
Hello,
I'm trying to use rosserial with Teensy 3.5 through bluetooth.
My first step: change the serial port from Serial to Serial1.
I follow the thread:
https://answers.ros.org/question/198247/how-to-change-the-serial-port-in-the-rosserial-lib-for-the-arduino-side/?answer=295159#post-id-295159
It compiles with Arduino Mega board but no with Teensy 3.5 (or other Teensy boards)
----------
I use:
Ubuntu 16.04, Kinetic ros, Arduino 1.8.5
The Hello World example code:
http://wiki.ros.org/rosserial_arduino/Tutorials/Hello%20World
----------
I tried to ways:
1. Modify the line 73 in the code arduino.1.8.5/libraries/ros_lib/ArduinoHardware.h
iostream = &Serial1;
2. Replace:
ros::NodeHandle nh;
with:
class NewHardware : public ArduinoHardware
{
public:
NewHardware():ArduinoHardware(&Serial1, 57600){};
};
ros::NodeHandle_ nh;
----------
The error when I try to compile is:
.../arduino-1.8.5/libraries/ros_lib/ArduinoHardware.h:67:5: note: no known conversion for argument 1 from 'HardwareSerial*' to 'usb_serial_class*'
no matching function for call to 'ArduinoHardware::ArduinoHardware(HardwareSerial*, int)'
----------
ArduinoHardware.h:
http://docs.ros.org/jade/api/rosserial_arduino/html/ArduinoHardware_8h_source.html
----------
↧
↧
How to create a ros launch file for arduino node?
Hey I wanted to open up the arduino node by using the ros launch file is there is any way to do that??
↧
Errors in connecting an Arduino to Ros Groovy
I'm trying to get an Arduino Uno hooked up to Ros Groovy; I've been following the Hello World tutorial for rosserial_arduino. When running >rosserial_python serial_node.py /dev/ttyACM0
I'm able to connect for a second, and I start getting the error:
> [ERROR] [Walltime: ...] Lost sync with device, restarting...
I noticed my Arduino code is still running even though it lost connection (I have a flashing LED indicator). Its not publishing anything to "Chatter" however - not even once before it disconnects.
Please let me know how I might be able to fix this!
Thanks!
↧
arduino sketch to subscribe to joint state msg
I'm trying to use rosserial on arduino to subscribe to move_group/fake_controller_joint_states and then publish the first joints position on a topic chatter just to test verify that im receiving the position but it seems that the call back is not working as I don't seem to receive the values being sent on fake_controller_joint_states. Im using an arduino mega, kinetic and ubuntu 16.04. I greatly appreciate any direction or input. thank you.
#if (ARDUINO >= 100)
#include
#else
#include
#endif
#include
#include
#include
#include
ros::NodeHandle nh;
std_msgs::Float64 mydata;
float angle[6] = {0,0,0,0,0,0};
void cmd_cb(const sensor_msgs::JointState& cmd_arm)
{
angle[0] = cmd_arm.position[0];
angle[1] = cmd_arm.position[1];
angle[2] = cmd_arm.position[2];
angle[3] = cmd_arm.position[3];
angle[4] = cmd_arm.position[4];
angle[5] = cmd_arm.position[5];
}
ros::Subscriber sub("/move_group/fake_controller_joint_states", cmd_cb);
ros::Publisher chatter("chatter", &mydata);
void setup()
{
nh.initNode();
nh.subscribe(sub);
nh.advertise(chatter);
}
void loop()
{
mydata.data = angle[1];
chatter.publish( &mydata );
nh.spinOnce();
delay(1);
}
rostopic info /move_group/fake_controller_joint_states returns:
Type: sensor_msgs/JointState
Publishers:
* /move_group (http://chris-Latitude-3540:40629/)
Subscribers:
* /joint_state_publisher (http://chris-Latitude-3540:41687/)
* /rostopic_5632_1530298559582 (http://chris-Latitude-3540:32869/)
* /serial_node (http://chris-Latitude-3540:44431/)
rosnode info /serial_node returns:
Node [/serial_node]
Publications:
* /chatter [std_msgs/Float64]
* /diagnostics [diagnostic_msgs/DiagnosticArray]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /move_group/fake_controller_joint_states [sensor_msgs/JointState]
Services:
* /serial_node/get_loggers
* /serial_node/set_logger_level
contacting node http://chris-Latitude-3540:44431/ ...
Pid: 10725
Connections:
* topic: /chatter
* to: /rostopic_9634_1530306645550
* direction: outbound
* transport: TCPROS
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /move_group/fake_controller_joint_states
* to: /move_group (http://chris-Latitude-3540:40629/)
* direction: inbound
* transport: TCPROS
↧
[Beginner]Using a message of a custom package in rosserial
Hello,
I know this questions has been asked several times, but I found no answer to my problem on the existing topics. I am trying to use rosserial to communicate with my c++ nodes. Everything was working well, but know I'm trying to use a message of my package on rosserial, and I get the following error on the arduino IDE :
Arduino/Servo_Test/Servo_Test.ino:15:45: fatal error: marvelmind_nav/position_control.h: No such file or directory
#include
I tried to include the "package/header of the message" since it is how it worked in my c++ code. I had first run : rosrun rosserial_arduino make_library.py path_to_libraries
I also tried to run rosrun rosserial_client make_library.py path_to_libraries your_message_package.
I sourced my setup.bash several times. And it seems like none of those commands generated my package folder in the ros_lib. I tried to copy directly the message folder in the ros_lib, but I have header problems then, since the program does not get the right path for the headers of the message header files.
I kind of begin in ros, so if you have any idea of what could go wrong, I'd be grateful
↧
↧
rosserial problem displaying linear_acceleration values from IMU
I have written a code for Arduino to connect with rosserial and publish on ros. However, it displays all the values correctly except linear_acceleration. I have changed the baud rate, call function from "vector.x()" to "vector[0]" and rechecked my sensor_msg/Imu.h file too. Everything looks correct. My Arduino code is as follows
#include
#include
#include
#include
#include
#include
#define BNO055_SAMPLERATE_DELAY_MS (10)
sensor_msgs::Imu odom_msg;
ros::Publisher pub_odom("imu0", &odom_msg);
ros::NodeHandle nh;
Adafruit_BNO055 bno = Adafruit_BNO055(10);
void setup(void)
{
nh.initNode();
nh.advertise(pub_odom);
Serial.begin(115200);
Serial.println(F("Orientation Sensor Test")); Serial.println(F(""));
/* Initialise the sensor */
if(!bno.begin())
{
/* There was a problem detecting the BNO055 ... check your connections */
Serial.print(F("Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!"));
while(1);
}
delay(10);
}
void loop(void)
{
imu::Quaternion quat = bno.getQuat();
odom_msg.orientation.x = quat.x();
odom_msg.orientation.y = quat.y();
odom_msg.orientation.z = quat.z();
odom_msg.orientation.w = quat.w();
//odom_msg.orientation_covariance[0] = -1;
imu::Vector<3> angaccel = bno.getVector(Adafruit_BNO055::VECTOR_GYROSCOPE);
odom_msg.angular_velocity.x = angaccel[0];
odom_msg.angular_velocity.y = angaccel[1];
odom_msg.angular_velocity.z = angaccel[2];
imu::Vector<3> euler1 = bno.getVector(Adafruit_BNO055::VECTOR_LINEARACCEL);
odom_msg.linear_acceleration.x = euler1[0];
odom_msg.linear_acceleration.y = euler1[1];
odom_msg.linear_acceleration.z = euler1[2];
//odom_msg.linear_acceleration.x = euler1.x();
//odom_msg.linear_acceleration.y = euler1.y();
//odom_msg.linear_acceleration.z = euler1.z();
odom_msg.angular_velocity_covariance[0] = 0;
odom_msg.linear_acceleration_covariance[0] = 0;
odom_msg.header.frame_id = "imu";
odom_msg.header.stamp = nh.now();
pub_odom.publish(&odom_msg);
nh.spinOnce();
delay(BNO055_SAMPLERATE_DELAY_MS);
}
**On Arduino serial monitor with a similar code, i am able to get all values correctly. But not on rosserial. The ourput on rosserial is the following**
---
header:
seq: 311
stamp:
secs: 1531067114
nsecs: 53815114
frame_id: imu
orientation:
x: -0.0120849609375
y: -0.0156860351562
z: 0.0182495117188
w: 0.999633789062
orientation_covariance: [0.0, 0.0, 0.0, 605297.1875, 9.805493222936335e-12, 6.358072525405582e-30, -8.836671222230488e-18, 6.8332662107650395e-34, 7.80629698470661e-36]
angular_velocity:
x: -0.00111111113802
y: -0.00111111113802
z: 0.00222222227603
angular_velocity_covariance: [0.0, 2.375406719749005e-36, -37636.5, -601862893993984.0, -37759.015625, 3.8772519442846755e-34, 2.6677259486100874e-23, 3.56086808692405e-310, 4.425906002008659e-23]
linear_acceleration:
x: 1.26991024075e-33
y: 6.96170055628e-309
z: 8.84134401092e-36
linear_acceleration_covariance: [9.091709527866322e-34, 4.673124563523994e+16, 1.9121903536199017e-308, 1.956152820753018e-38, -0.0004948825226165354, -1.010046607868369e+22, -5.629338932247528e+25, -4.8146399716934285e-28, 0.019999999552965164]
---
I am not worried about the covariance values, as i dont require them, but the linear_acceleration values don't change with time, even under a lot of moment of imu. In the code, I even tried to set the value of published linear_acceleration to 0 but still shows that constant value.
Please help me, if anyone is able to figure out my mistake.
↧
Issue with Rosserial Custom Message
I am using ROS Kinetic on Ubuntu 16.04. I've been trying to get a custom message type to work over rosserial_arduino for some time now. I have properly generated the C++ message headers in the package. For reference, here is the custom message type I am planning on using:
# MotorEncoder.msg
int32 leftValue
int32 rightValue
time leftTime
time rightTime
After running `catkin_make` on the project workspace, I run the `source devel/setup.bash` command to let ROS know I have messages that need to have generated Arduino-based headers. Then I run the command
rosrun rosserial_client make_libraries ~/Arduino/libraries
This generates the Arduino-based headers which I am able to properly compile and run using this Arduino script:
#include
#include
ros::NodeHandle nh;
rover_core::MotorEncoder msg;
ros::Publisher pub("/test", &msg);
void setup() {
// put your setup code here, to run once:
nh.initNode();
nh.advertise(pub);
}
void loop() {
// put your main code here, to run repeatedly:
nh.spinOnce();
}
I ran the rosserial node after deploying it to the arduino:
rosrun rosserial_python serial_node.py /dev/ttyUSB0
And I get the output:
[INFO] [1531232541.250369]: ROS Serial Python Node
[INFO] [1531232541.262715]: Connecting to /dev/ttyUSB0 at 57600 baud
[ERROR] [1531232543.413050]: Creation of publisher failed: too many values to unpack
I've tried a bunch of different solutions, but nothing seems to be fixing the problem. I've tried differently structured message types as well. Is something wrong with the process I'm using to generate these? Any help would be greatly appreciated. I'd be more than happy to provide an additional information as well.
↧
Cannot use rosserial_server
Hi,
I want to use rosserial_server for high speed communication.
But, I use rosserial_server serial_node.cpp
$ rosrun rosserial _server serial_node
I get the error message
[INFO] [1531356226.107258127] Opened /dev/ttyACM0
[WARN] [1531356226.117567124] Socket asio error, closing socket: asio.misc:2
[INFO] [1531356228.108342967] Opened /dev/ttyACM0
[WARN] [1531356228.119077841] Socket asio error, closing socket: asio.misc:2
...
So,What do I do to solve this error?
(I use Ubuntu16.04LTS,kinetic,[ros_lib_kinetic](https://os.mbed.com/users/garyservin/code/ros_lib_kinetic/))
↧
SimpleActionServer via rosserial arduino
I haven't been able to find and information or examples on this. Is it possible to run a FollowJointTrajectory action service directly from an arduino? or do I need to build a separate action service node and the pass joint positions to the arduino on another topic? thank you.
↧
↧
Rosserial fails to generate rosserial_msgs library
I've followed this tutorial to set up rosserial for Arduino:
http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
But once I get to the step where I generate the libraries for the Arduino with the command
rosrun rosserial_arduino make_libraries.py .
I get the following output at the end:
*** Warning, failed to generate libraries for the following packages: ***
hector_quadrotor_controller_gazebo (missing dependency)
rosserial_msgs
map_msgs
rosserial_arduino
The output above that doesn't tell me anything:
Exporting rosserial_msgs
Messages:
TopicInfo,Exporting std_srvs
Services:
Empty,
...
Exporting map_msgs
Messages:
OccupancyGridUpdate,PointCloud2Update,ProjectedMapInfo,ProjectedMap,
Services:
SetMapProjections,GetPointMapROI,ProjectedMapsInfo,Exporting tf2_msgs
Messages:
LookupTransformActionResult,LookupTransformAction,LookupTransformActionGoal,LookupTransformFeedback,TFMessage,LookupTransformActionFeedback,TF2Error,LookupTransformGoal,LookupTransformResult,
Services:
FrameGraph,
...
Exporting rosserial_arduino
Messages:
Adc,Exporting hector_gazebo_plugins
Services:
SetBias,
I'm not immediately interested in the first and third libraries, but the second and fourth are a problem, because they make it impossible to use rosserial. How do I solve this?
↧
Rosserial Error: No matching function for call to
I'm trying to load Odom example from ros_lib on my robot.
I Replaced
ros::NodeHandle nh;
to
ros::NodeHandle_ nh;
But then it shows the error: No matching function for call to on
broadcaster.init(nh);
in `setup()`.
Can anyone please give me some suggestions?
Update:
This is the complete code:
#include
#include
#include
#include
ros::NodeHandle_ nh;
geometry_msgs::TransformStamped t; tf::TransformBroadcaster broadcaster;
double x = 1.0; double y = 0.0; double theta = 1.57;
char base_link[] = "/base_link";
char odom[] = "/odom";
void setup()
{
nh.initNode();
broadcaster.init(nh);
}
void loop()
{
// drive in a circle
double dx = 0.2;
double dtheta = 0.18;
x += cos(theta)*dx*0.1;
y += sin(theta)*dx*0.1;
theta += dtheta*0.1;
if(theta > 3.14)
theta=-3.14;
// tf odom->base_link
t.header.frame_id = odom;
t.child_frame_id = base_link;
t.transform.translation.x = x;
t.transform.translation.y = y;
t.transform.rotation = tf::createQuaternionFromYaw(theta);
t.header.stamp = nh.now();
broadcaster.sendTransform(t);
nh.spinOnce();
delay(10);
}
The error message I received:
/tmp/arduino_modified_sketch_779304/Odom.ino: In function 'void setup()':
Odom:25: error: no matching function for call to 'tf::TransformBroadcaster::init(ros::NodeHandle_&)'
broadcaster.init(nh);
^
↧
lost sync with device ...restarting...
#include
#include
#include
#define PI 3.1415926
float d1,d2,d3,d4,theta1,theta2,Theta1,Theta2;
int h=30;
void servoes(){
theta1=PI/2;
theta2=PI/2;
d1=105.0;
d2=130.0;
d3=d1*cos(theta1-PI/4)+d2*cos(theta2-theta1+PI/4);
d4=d3-h;
Theta2=acos((pow(d1,2)+pow(d2,2)-pow(d3,2))/(2*d1*d2))-acos((pow(d1,2)+pow(d2,2)-pow(d4,2))/(2*d1*d2))+theta2;
Theta1=atan(d1*sin(Theta2)/(d1+d2*cos(Theta2)));
}
int main(int argc, char **argv) {
ros::init(argc, argv, "servo_pub");
ros::NodeHandle n;
ros::Publisher my_publisher_object = n.advertise("servo", 1);
std_msgs::UInt16 msg;
servoes();
int theta3=(Theta1+PI/4)/PI*2000+500;
int theta4=Theta2/PI*2000+500;
ros::Rate loop_rate(10);
while (ros::ok())
{
msg.data =theta3;
my_publisher_object.publish(msg);
loop_rate.sleep();
}
}
here are my code
and
here are my arduino code
enter code here
#if (ARDUINO >= 100)
#include
#else
#include
#endif
#include
#include
#include
#include
#include
int h;
ros::NodeHandle nh;
void servo_cb( const std_msgs::UInt16& cmd_msg){
h=cmd_msg.data;
}
ros::Subscriber sub("servo", servo_cb);
void setup(){
Serial.begin(115200);
nh.initNode();
nh.subscribe(sub);
}
void loop(){
if(Serial.available()>0)
{
Serial.print("#0 P");
Serial.print(h);
Serial.println(" T500");
delay(100);
}
nh.spinOnce();
nh.spinOnce();
nh.spinOnce();
}
and i run my code,but
it tell me :
lost sync with device ...restarting...;
again and again.I need help please...
↧
How can i send a message from ROS to arduino using rosserial?
Here is my arduino code:
#include
#include
#include
ros::NodeHandle nh;
void ledGlow(const std_msgs::Int8& val){
if(val.data==100){
digitalWrite(13, HIGH);
}
else{
digitalWrite(13, LOW);
}
}
ros::Subscriber led("led/start", &ledGlow);
void setup() {
pinMode(13, OUTPUT);
nh.initNode();
nh.subscribe(led);
}
void loop() {
nh.spinOnce();
delay(10);
}
I am giving the following commands in the terminal:
1. roscore
2. rostopic pub led/start std_msgs/Int8 100
After giving the second command LED 13 doesn't glow, also RX led on arduino board doesn't blink.
↧
↧
Why are my rosserial messages garbled on arrival to OpenCR?
I'm trying to write a custom firmware for [OpenCR](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) to drive a robot other than a TurtleBot3. I'm using Twist messages published from a test `rospy` script to send onwards to the OpenCR firmware via `rosserial`, but the contents of the messages on the receiving side are not as I sent them.
I'm not exactly sure how the message ends up as it is, but if I `sprintf` the values received over the wire, it seems like they vary from being `0`, `-2`, and a very very large integer that seems like it is an overflow. I would expect them to be the same as I am sending them from Python land.
OpenCR only really emulates an Arduino, and there's a mention in the documentation that some of the `ros_lib` Arduino libraries have been modified for the hardware specific to OpenCR. I have tried running with my own generated `ros_lib`, the `turtlebot3_ros_lib` from the OpenCR repository, and with no `ros_lib`-related libraries in my project such that the one embedded in the OpenCR board configuration gets used, and it doesn't seem to make any difference.
Here's an example run of the test script on my host that publishes messages:
root@sprout:~/catkin_ws# python ~/app/tugboat/test/motor_test.py
[INFO] [1533820081.365298]: linear:
x: -0.135754864055
y: 0
z: 0
angular:
x: 0
y: 0
z: -0.679274703424
[INFO] [1533820081.463683]: linear:
x: -0.128229837148
y: 0
z: 0
angular:
x: 0
y: 0
z: -0.715908250178
[INFO] [1533820081.564090]: linear:
x: -0.120405402722
y: 0
z: 0
angular:
x: 0
y: 0
z: -0.751644311374
# ... snip
And here's an example of what seems to be arriving at OpenCR:
devfirmware_rosserial_1 | [INFO] [1533757015.825814]: ROS Serial Python Node
devfirmware_rosserial_1 | [INFO] [1533757015.837030]: Connecting to /dev/ttyACM0 at 57600 baud
devfirmware_rosserial_1 | [INFO] [1533757017.974415]: Note: subscribe buffer size is 1024 bytes
devfirmware_rosserial_1 | [INFO] [1533757017.974978]: Setup subscriber on cmd_vel [geometry_msgs/Twist]
devfirmware_rosserial_1 | [INFO] [1533757017.980478]: Setup subscriber on motor_power [std_msgs/Bool]
devfirmware_rosserial_1 | [INFO] [1533757017.984510]: Setup subscriber on reset [std_msgs/Empty]
devfirmware_rosserial_1 | [INFO] [1533757021.342291]: goal_velocity_cmd linear=26815635018547947003520042492298900444795045699074586295975015555529561951619119068050367547157165677495562220457019472005532242858568270096346353898618880.000000 angular= 0.000000
devfirmware_rosserial_1 | [INFO] [1533757021.443306]: goal_velocity_cmd linear= 0.000000 angular= 0.000000
devfirmware_rosserial_1 | [INFO] [1533757021.552619]: goal_velocity_cmd linear= 0.000000 angular= 0.000000
devfirmware_rosserial_1 | [INFO] [1533757021.645970]: goal_velocity_cmd linear=26815635018679589800415901776210826205356983248386788284836442571166664271756824572989573094671584942541931284769711377256392798556191445325024837289115648.000000 angular= 0.000000
devfirmware_rosserial_1 | [INFO] [1533757021.745490]: goal_velocity_cmd linear=-2.000001 angular= 0.000000
Here's the rosserial callback in the Arduino sketch being loaded to OpenCR: https://github.com/airhorns/tugboat/blob/master/opencr_firmware/tugboat/tugboat.ino#L31-L38
Here's the test script that publishes those messages: https://github.com/airhorns/tugboat/blob/master/opencr_firmware/tugboat/test/motor_test.py
Why am I getting gibberish but no crashes?
I'm running on Ubuntu 18.04 on an XPS 13 laptop on ROS Kinetic. You can see the environment build here: https://github.com/airhorns/tugboat/blob/master/devhost/Dockerfile
↧
rosserial [ERROR] lost sync with device, restarting ...
Hello I am building a differential drive robot using [differential_drive](http://wiki.ros.org/differential_drive) package and [rosserial_tivac](http://wiki.ros.org/rosserial_tivac) to interface with my hardware I have written my codes and iclude them all in one launch file
when i use roslaunch every thing is working fine and the following message appear in terminal
process[rosout-1]: started with pid [11918]
started core service [/rosout]
process[serial_gate_node-2]: started with pid [11935]
process[lpid_velocity-3]: started with pid [11936]
process[rpid_velocity-4]: started with pid [11937]
process[twist_to_motors-5]: started with pid [11938]
[INFO] [1534898274.948213]: ROS Serial Python Node
[INFO] [1534898274.952975]: Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [1534898274.997246]: /twist_to_motors started
[INFO] [1534898277.081039]: Note: publish buffer size is 512 bytes
[INFO] [1534898277.081769]: Setup publisher on lwheel [std_msgs/Int16]
[INFO] [1534898277.093732]: Setup publisher on rwheel [std_msgs/Int16]
[INFO] [1534898277.111318]: Note: subscribe buffer size is 512 bytes
[INFO] [1534898277.112105]: Setup subscriber on lmotor_cmd [std_msgs/Float32]
[INFO] [1534898277.126081]: Setup subscriber on rmotor_cmd [std_msgs/Float32]
Then when I try to publish a msg to the topic /twist that supposes to drive the robot. The motors start operating in the right direction but with a full speed which possibly means they didn't get the proper PWM value
and I am getting the following info appearing on my terminal
[INFO] [1534898288.361617]: wrong checksum for topic id and msg
[ERROR] [1534898302.098102]: Lost sync with device, restarting...
the codes witch I am using is from this [repository](https://github.com/ShehabAldeen/tripleX) if any one can help please
↧
Rosserial not synchronizing with arduino Due, unless manually hitting the reset button of the arduino
This is the situation:
1. I upload the arduino sketch to my Arduino Due. I have taken care of including the "#define USE_USBCON" as decribed in other issues.
2. I launch the rosserial node on my laptop
3. I get following error message: [ERROR] [1534925083.372625]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
4. It is only after manually hitting the reset button from the Arduino that the syncing happens and that the Arduino starts receiving and publishing messages.
I would like to avoid the manual reset step, which is somewhat cumbersome. I was not having this issue when using my Arduino Uno and Mega, so I am pretty sure it has somewhat to do with the fact that I am now working with an Arduino Due.
Anyone having the same issue? Any solution to suggest?
↧