Hi
I have an arduino zero, connected to native port, Arduino IDE 1.8.7, Ubuntu 18.04 and ROS melodic.
I did the tutorial Hello World, to publish something to a ros topic.
[link text](http://wiki.ros.org/rosserial_arduino/Tutorials/Blink)
My commands:
1.) roscore
separate terminal
2.) rosrun rosserial_python serial_node.py /dev/ttyACM0
which is my port.
After a few seconds the following error occurs:
[ERROR] [1540478108.408171]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python wih groovy Arduino
If I do the same procedure with an Aruino Uno it works without problems.
Does someone know the the mistake could be?
Thanks
↧
Roserial arduino tutorial hello world
↧
Rosserial arudino zero tutorial hello world
Hi
I have an arduino zero, connected to native port, Arduino IDE 1.8.7, Ubuntu 18.04 and ROS melodic.
I did the tutorial Hello World, to publish something to a ros topic.
[link text](http://wiki.ros.org/rosserial_arduino/Tutorials)
My commands:
1.) roscore
separate terminal
2.) rosrun rosserial_python serial_node.py /dev/ttyACM0
which is my port.
After a few seconds the following error occurs: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python wih groovy Arduino
If I do the same procedure with an Aruino Uno it works without problems.
Does someone know the the mistake could be?
Thanks
↧
↧
python code can replace a command line?
anybody can help me with a crossroads that i need to solve. I have a code in python, it receives msg laserscan and transform to pcl, inside the same code need to controller a servo. it moves the hokuyo laser after 400 msg recive to another position, need a 3 or 4 positions 0-180 degrees. After it has 3-4 position return to original position and so successively, i know that with a launch file i could move the servo or command line too. the questions is. I could move servo publishing new position in python code using rosserial. tnx for read and hope someone can help with it.
↧
Arduino zero rosserial tutorial
Hi
I have an arduino zero, connected to native port, Arduino IDE 1.8.7, Ubuntu 18.04 and ROS melodic.
I did the rossserial arduino tutorial Hello World, to publish something to a ros topic. [link text](http://wiki.ros.org/rosserial_arduino/Tutorials/Hello%20World)
My commands: 1.) roscore
separate terminal 2.) rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=57600
The command window shows this:
[INFO] [1541675538.966820]: ROS Serial Python Node
[INFO] [1541675538.978137]: Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [1541675541.090206]: Requesting topics...
[ERROR] [1541675556.094888]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
If think I have tried nearly everything. deinstall and install it, switched the computer off and on, tried with multiple baudrates (it is not hardcode in the .ino file, since I use the file form the tutorial, checked the usb port, tried commands, #define USE_USBCON, ros::spinOnce(), tried to set the baudrate in the .ino file: nodehande.getHardware()->setBaud(57600);
Nothing works and more surprisingly if I do the same procedure with an Arduino Uno it works. They should have the same architecture?
Does someone know where the mistake could be?
Thanks
↧
Where can i get ROS serial Arduino tutorials?
Hello guys, I'm trying to get some rosserial tutorials for arduino.The ones available on ros arent really sufficient. Can someone here can guide me for the same.
↧
↧
Rosserial baudrate arduino zero
Hi,
does someone know where the baud rate is defined? I look in ArduinoHardware.h, and in the package rosserial_python in serial_node and serial_client. I have changed them but default is always 57600. And yes I know I can define it: `rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=250000`
And second: Is it correct that it works with different baudrates, not just one? And what's the maximum baudrate for an arudino zero?
Thanks
↧
Error with service server for Arduino
Hi folks, I am trying to build a service server on an Arduino UNO using ROS. I am running ROS Kinetic on Ubuntu 16.04. I am currently stuck with the following problem and I do not know how to solve it. I would appreciate if you can help me out.
First of all, the script I built to test if the workspace works correctly is posted below:
#include
#include
#include
#include
// Create roscpp's interface for creating subscribers, publishers, etc
ros::NodeHandle n;
void setup()
{
// Initialize node
n.initNode();
}
void loop()
{
n.spinOnce();
delay(1000);
}
After building this package using 'catkin build', I obtained the following message indicating it was built successfully:
Warnings << helloworld:make /home/mirzam/cmaketut_ws/logs/helloworld/build.make.165.log
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Firmware Size: [Program: 8424 bytes (25.7%)] [Data: 1277 bytes (62.4%)] on atmega328p
EEPROM Size: [Program: 0 bytes (0.0%)] [Data: 0 bytes (0.0%)] on atmega328p
cd /home/mirzam/cmaketut_ws/build/helloworld; catkin build --get-env helloworld | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
Therefore, I assume that the functions for creating a service server are available now for use. The scripts for the CMake list and package.xml for the helloworld package (the package that contains the servernode.cpp) can be found in the following two links respectively:
[link text](https://pastebin.com/raw/8j7QWpgF)
and [link text](https://pastebin.com/raw/PDDEMgPz)
The CMake file inside the directory where the script is located can be found here: [link text](https://pastebin.com/raw/qf7c1paj)
Programming the code onto the Arduino also seems to work.
Then I decided to create a simple service server which takes request from the std_srvs Empty type. I checked if this type is available with 'rossrv list' (as well as the custom made srv type ModeSelect, which is eventually what I want to include into the service server). The std_srvs/Empty is indeed available:
std_srvs/Empty
helloworld_msgs/ModeSelect
I have adjusted the code to create a service server:
#include
#include
#include
#include
// Create roscpp's interface for creating subscribers, publishers, etc
ros::NodeHandle n;
// Create a service server that takes nothing and returns nothing
void callback(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
{
// Simulate function running for a non-deterministic amount of time
delay(random(5,70));
}
void setup()
{
// Initialize node
n.initNode();
}
ros::ServiceServer service = n.advertiseService("get_nothing", &callback);
void loop()
{
n.spinOnce();
delay(1000);
}
However, if I try to build the package, I get the following error message:
Errors << helloworld:make /home/mirzam/cmaketut_ws/logs/helloworld/build.make.170.log
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
/home/mirzam/cmaketut_ws/src/helloworld/firmware/servernode.cpp:22:1: error: invalid use of template-name ‘ros::ServiceServer’ without an argument list
ros::ServiceServer service = n.advertiseService("get_nothing", &callback);
^
make[6]: *** [CMakeFiles/hello.dir/servernode.cpp.obj] Error 1
make[5]: *** [CMakeFiles/hello.dir/all] Error 2
make[4]: *** [CMakeFiles/hello.dir/rule] Error 2
make[3]: *** [hello] Error 2
make[2]: *** [CMakeFiles/helloworld_firmware_hello] Error 2
make[1]: *** [CMakeFiles/helloworld_firmware_hello.dir/all] Error 2
make: *** [all] Error 2
cd /home/mirzam/cmaketut_ws/build/helloworld; catkin build --get-env helloworld | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
I have searched every corner of the web to see how to fix this problem. It seemed like I needed to tell explicitly which request and response message data type the service server gets, so I adjusted this particular line of code:
ros::ServiceServer service = n.advertiseService("get_nothing", &callback);
To:
ros::ServiceServer service = n.advertiseService("get_nothing", &callback);
Unfortunately, this did not solve anything. The error message I get now is:
Errors << helloworld:make /home/mirzam/cmaketut_ws/logs/helloworld/build.make.171.log
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
/home/mirzam/cmaketut_ws/src/helloworld/firmware/servernode.cpp:22:126: error: no matching function for call to ‘ros::NodeHandle_::advertiseService(const char [12], void (*)(std_srvs::Empty::Request&, std_srvs::Empty::Response&))’
ros::ServiceServer service = n.advertiseService("get_nothing", &callback);
^
/home/mirzam/cmaketut_ws/src/helloworld/firmware/servernode.cpp:22:126: note: candidate is:
In file included from /home/mirzam/cmaketut_ws/build/helloworld/ros_lib/ros.h:38:0,
from /home/mirzam/cmaketut_ws/src/helloworld/firmware/servernode.cpp:1:
/home/mirzam/cmaketut_ws/build/helloworld/ros_lib/ros/node_handle.h:448:8: note: template bool ros::NodeHandle_::advertiseService(ros::ServiceServer&) [with MReq = MReq; MRes = MRes; ObjT = ObjT; Hardware = ArduinoHardware; int MAX_SUBSCRIBERS = 25; int MAX_PUBLISHERS = 25; int INPUT_SIZE = 280; int OUTPUT_SIZE = 280]
bool advertiseService(ServiceServer& srv)
^
/home/mirzam/cmaketut_ws/build/helloworld/ros_lib/ros/node_handle.h:448:8: note: template argument deduction/substitution failed:
/home/mirzam/cmaketut_ws/src/helloworld/firmware/servernode.cpp:22:126: note: mismatched types ‘ros::ServiceServer’ and ‘const char [12]’
ros::ServiceServer service = n.advertiseService("get_nothing", &callback);
^
make[6]: *** [CMakeFiles/hello.dir/servernode.cpp.obj] Error 1
make[5]: *** [CMakeFiles/hello.dir/all] Error 2
make[4]: *** [CMakeFiles/hello.dir/rule] Error 2
make[3]: *** [hello] Error 2
make[2]: *** [CMakeFiles/helloworld_firmware_hello] Error 2
make[1]: *** [CMakeFiles/helloworld_firmware_hello.dir/all] Error 2
make: *** [all] Error 2
cd /home/mirzam/cmaketut_ws/build/helloworld; catkin build --get-env helloworld | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
I think that I am implementing a service server the right way. Do you have any suggestions on what is wrong with the code/package? Or in general, do you have any tips on how to implement a service server on a microcontroller?
Thank you for helping me out!
↧
Reestablish rosserial-connection
Hi Community,
following setup: PC with *roscore* and *rosserial_embedded serial_node tcp* with a tiny *rosserial node* on an embedded linux board. So far so good, everytinh is working.
**Problem:** If i have to restart roscore/rosseriay on my PC, i also have to restart my rosseria-node at my tiny linux board - **by hand**.
**Question:** Can i anyhow configure my rosserial to reestablish this communication?
I have tried to check the return value from nh.spinOnce and rerun nh.initNode(); but with out any progress.
// within main loop
int check = nh.spinOnce();
if ( check == 0)
printf("ros is okay");
else
{
printf("ros is NOT okay");
nh.initNode();
}
Is there the possibility to keep one rosserial node on a dedicated device alive while roscore/rosserial_python is down and later reconnect to it? Maybe the missing timestamps are a problem?
Every helping hand is welcome!
↧
Odometry without covariance
Hello,
Is there anyway to send the odometry message without covariance? I followed the http://wiki.ros.org/navigation/Tutorials/RobotSetup/Odom tutorial to write a odometry transmitter on my platform (TM4C123) following http://wiki.ros.org/rosserial_tivac and the problem is these devices can only do 512 bytes serial buffer.
So both the odometry message object, and the twist object as covariance arrays of float[36]. which takes most of the space in the serial packet.
Is there anyway to use odometry without the covariance array? i just dont want to serialize that part of the message?
Best regards,
C.
↧
↧
std_msgs types and 'normal' type
Hi
I want to display a variable on a topic. Therefore I need to transform my variable from an volatile unsigned long to an std_msgs type (for example UInt64). This gives following error:
no match for 'operator=' (operand types are 'std_msgs::UInt64' and 'volatile long unsigned int')
How can i convert this long to a std_msgs?
Thanks
↧
changing the port on rosserial_embeddedlinux node results in segmentation fault?
running the HelloRos example in rosserial_embeddedlinux package on Raspberry Pi, Raspbian.
if default port is used, compiles and runs OK
when adding port number to path like so:
nh.initNode(192.168.1.101:114411)
results in immediate segmentation fault..
how can the port number be added to the initNode call?
Quoted from UPenn Publisher example:
> NodeHandle.initNode() accepts> arguments like:>> /dev/ttyUSB1 uses the designated> serial port for messages to> rosserial_python> 192.168.1.2 connects to rosserial_python at the specified IP> address on the default port 11411> 192.168.1.2:12345 connects to rosserial_python at the specified IP> address on the specified port number
↧
How can I subscribe data from mpu6050?
I am using MPU6050 with arduino using rosserial. I have created a publisher in arduino which gives data after echoing.
But i want to subscribe this data and use. How can i create a subscriber node? Please guide me,thank you.
↧
ABB: S4C + IRB6650: How do I visualize an ABB robot's movements in Rviz
Forgive me, I am pretty new to ROS, so please excuse any gaps in my knowledge. I have a wireless ESP8266 microcontroller reading joint_state data from an ABB robot through serial connection and it is sending it directly to a remote ros server. I'm able to see the physical robot's live position by using 'rostopic echo joint_states' on the server, but I'm unable to visualize its movements in Rviz. I launched the demo of the Abb_irb6640_moveit_config package but I am confused on how to control it by reading joint_states. I am attempting to use Rviz in conjunction with rosserial's serial_node.py script.
UPDATE:
Thanks to @gdvhoorn ! I was finally able to get the visualization to work. I hadn't mentioned earlier that I was using the rosserial package to publish joint_state msgs using this arduino code [https://github.com/mikevillan26/open_abb_serial_logger.git](https://github.com/mikevillan26/open_abb_serial_logger.git). I had to simply change the joint names I had declared in my code to reflect those of the abb_irb_6640 urdf. From there, I could launch the robot_state_visualize.launch file in the abb_irb6640_support pkg in conjunction with the rosserial_python/serial_node.py/tcp and the model would finally reflect the live movements of my robot.
↧
↧
rosserial kinetic [Error 5] Input/output error
I sent a message from a moveit demo.launch (angles of the joints from sensor_msgs::JointState) which I created from moveit setup assistant to a .cpp file, and publish a converted value to my .ino file (arduino file).
The connection and subscriber/publisher worked fine when connected only an arduino board (I used arduino mega 2560 here, and chose the correct serial port and baud rate), but when I connected my servo motors to the arduino board, the connection was failed and showed me:
Run loop error: [Error 5] Input/output error
The error seemed cause by the connection of the servo. But I have run the ServoControl tutorial in rosserial.
Is there anyone can help me for this?
Is the requested voltage too big to be given?
This is my first time on ROS Answers, sorry for the bad typesetting.
Thanks, Wolf
Edited 1: error information
[WARN] [1545576797.165756]: Last read step: data checksum
[WARN] [1545576797.168735]: Run loop error: [Error 5] Input/output error
Traceback (most recent call last):
File "/home/wolf/Mechanical_Practice/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 89, in
client.run()
File "/home/wolf/Mechanical_Practice/catkin_ws/src/rosserial/rosserial_python/SerialClient.py", line 554, in run
self.port.flushInput()
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 532, in flushInput
self.reset_input_buffer()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 566, in reset_input_buffer
termios.tcflush(self.fd, termios.TCIFLUSH)
termios.error: (5, 'Input/output error')
↧
Logging variables in rosserial_arduino: possible or not?
I'm trying to send values from my arduino for debugging, and I'd like to use the existing log commands if possible. However, when I try to add variables to the log string the same way I would for printf() or similar, I get an error.
Specifically, this:
nh.logdebug("Received wheel commands %i, %i", leftWheelCmd, rightWheelCmd);
gets this:
```src/main.cpp:107:76: error: no matching function for call to 'ros::NodeHandle_::logdebug(const char [31], int&, int&)'```
rosserial_arduino's logging tutorial page doesn't have any examples of logging variables, but it also doesn't say that logging variables is impossible.
So, can I log variables somehow, or do I have to create a separate debug topic to publish them in?
↧
rosserial_arduino Blink Example in Arduino IDE not working
Hi Everyone- pretty new to the ROS and here is my issue.
Trying to use rosserial_arduino on Ubuntu 16.02 LTS. (kinetic) I have followed all the steps outlined in [Arduino IDE Setup tutorial](http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup).
When trying to run the Blink Example in Arduino IDE I’ve got following error:
Arduino: 1.8.8 (Linux), Board: "Arduino Duemilanove or Diecimila, ATmega328P"
In file included from /Arduino/libraries/ros_lib/ros.h:38:0, from /Arduino/libraries/ros_lib/examples/Blink/Blink.pde:6: /Arduino/libraries/ros_lib/ros/node_handle.h:41:38: fatal error: rosserial_msgs/TopicInfo.h: No such file or directory compilation terminated. exit status 1 Error compiling for board Arduino Duemilanove or Diecimila.
I have confirmed that my ros_lib folder is located here: /Arduino/libraries/ros_lib
Not sure how relevant this is but I do NOT have “rosserial Arduino Library” installed that is available in Library management.
Thank you.
↧
rosserial Publish and Subscribe to Ultrasonic Ping Range Data?
Hi,
I am very new to ROS and I have a few questions as I am trying to learn it all on my own. I've read the tutorials but there are still some things I need some clarification on.
I want to publish ultrasonic sensor data as a range message to a topic. And then I want the same arduino to subscribe to that topic, and use that data to turn the servo motor depending on the distance read from the ultrasonic sensor. This is the code that I have come up inspired ny the rosserial tutorials.
I am coming to the error on arduino ide that states:
" 'const class sensor_msgs::Range' has no member named 'data'. " I am not sure which type of member it should be. Also, if I have any other noticeable errors that did not appear on verification, kindly let me know as I am doing my best to learn ROS. Thank you very much. Best, Matthew.
#if (ARDUINO >= 100)
#include
#else
#include
#endif
#include
#include
#include
#include
Servo servo;
ros::NodeHandle nh;
sensor_msgs::Range range_msg;
long duration;
int distance;
void servo_cb( const sensor_msgs::Range& range_msg){
distance = range_msg.data;
if (distance < 30) {
servo.write(0);
}
else {
servo.write(90);
}
}
ros::Publisher pub_range1("/ultrasound1", &range_msg);
ros::Subscriber sub_range("/ultrasound1", servo_cb);
char frameid[] = "/ultrasound";
void setup()
{
nh.initNode();
nh.advertise(pub_range1);
}
long range_time;
void loop()
{
//publish the adc value every 50 milliseconds
//since it takes that long for the sensor to stabilize
if ( millis() >= range_time ){
range_msg.range = getRange_Ultrasound(14);
pub_range1.publish(&range_msg);
range_time = millis() + 1000;
}
nh.spinOnce();
}
float getRange_Ultrasound(int pin_num)
{
pinMode(pin_num, OUTPUT);
digitalWrite(pin_num, LOW);
delayMicroseconds(2);
digitalWrite(pin_num, HIGH);
delayMicroseconds(10);
digitalWrite(pin_num, LOW);
pinMode(pin_num, INPUT);
duration = pulseIn(pin_num, HIGH);
return duration/58;
}
↧
↧
rosserial arduino losing sync
Dear community,
I have used ROS in the past, but it was for different applications.
Going straight to the point, I am building an autonomous hexapod (with lidars, depth cameras etc.) but I am struggling to have the communication with arduino working properly.
The problem seems to be linked to the calculations I do in order to obtain the IMU readings.
If I comment out the function responsible for retrieving the new data, the publishing from arduino, and the echo I do on the topic of interest, can loop forever.
If I retrieve IMU readings in the main loop the command:
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=115200
fails after an arbitrary time.
Here I list the code for the loop and the function I am using in order to retrieve the readings:
void loop() {
if (!dmpReady) return;
if (state == "Idle" && millis() - t0 >= 80){
updateMeasurements();
delay(20);
pub_imu.publish(&imuMeasure);
t0 = millis();
}
nh.spinOnce();}
void updateMeasurements(){
mpu.resetFIFO();
while (!mpuInterrupt && fifoCount < packetSize) {
if (mpuInterrupt && fifoCount < packetSize) {
fifoCount = mpu.getFIFOCount();
}
}
mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();
fifoCount = mpu.getFIFOCount();
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();
mpu.getFIFOBytes(fifoBuffer, packetSize);
fifoCount -= packetSize;
mpu.dmpGetQuaternion(&q, fifoBuffer);
imuMeasure.w = q.w;
imuMeasure.x = q.x;
imuMeasure.y = q.y;
imuMeasure.z = q.z;}
As I said, after an arbitrary time I start to get error messages from the rosserial python terminal like:
[ERROR] [1546970875.729310]: Lost sync with device, restarting...
[ERROR] [1546970890.731936]: Lost sync with device, restarting...
[ERROR] [1546970905.734680]: Lost sync with device, restarting...
At this point, in order to get things to work properly again, I have to reset the Arduino (mega).
I beg for your help, I am not getting out this it seems.
↧
Publisher or Subscriber inside a class [rosserial]
Hi, I'm using rosserial in Arduino and have a problem initializing the Publisher or Subscriber inside the class constructor:
void setup() {
DifferentialDriveRobot *my_robot = new DifferentialDriveRobot( );
}
void loop() {
...
}
And the class is implemented as (in this example, with a subscriber):
class DifferentialDriveRobot
{
...
public:
ros::NodeHandle nh;
ros::Subscriber sub;
...
void ddr_callback(const geometry_msgs::Twist& msg) {...}
DifferentialDriveRobot() { // Constructor
nh.initNode()
sub("/cmd_vel_mux/input/teleop", ddr_callback);
nh.subscribe(sub);
}
};
And the compiling errors are the following:
**error: no matching function for call to 'ros::Subscriber::Subscriber()'**
**note: candidate expects 3 arguments, 0 provided**
**error: no match for call to '(ros::Subscriber) (const char [26], void (&)(const geometry_msgs::Twist&))'**
**sub("/cmd_vel_mux/input/teleop", ddr_callback);**
I think that this is because of the initialization of the `sub` variable without any parameter. Should I declare it as a pointer?
**NOTE:** If I declare the `ros::NodeHandle nh` and `ros::Subscriber sub("/cmd_vel_mux/input/teleop", ddr_callback)` in the main loop as global variables, the code works fine.
I'm not very familiarized using templates, so I don't know exactly if exists an good implementation for this problem in the ros_lib library.
Thanks for your help!
----------
Update
Error message shown by the Arduino IDE when compile the answer of @DavidN:
Arduino: 1.6.12 (Linux), Board: "Arduino Leonardo"
In file included from /home/emiliano/catkin_ws/src/my_mobile_robot/from_keyboard_node-local_variables/from_keyboard_node-local_variables.ino:27:0:
DifferentialDriveRobot.h:45: error: invalid use of template-name 'ros::Subscriber' without an argument list
ros::Subscriber sub;
^
sketch/DifferentialDriveRobot.h: In constructor 'DifferentialDriveRobot::DifferentialDriveRobot(DCMotor*, DCMotor*, double, double)':
DifferentialDriveRobot.h:67: error: 'sub' was not declared in this scope
sub = nh.subscribe("/cmd_vel_mux/input/teleop", 1, &DifferentialDriveRobot::ddr_callback, this);
^
DifferentialDriveRobot.h:67: error: no matching function for call to 'ros::NodeHandle_::subscribe(const char [26], int, void (DifferentialDriveRobot::*)(const geometry_msgs::Twist&), DifferentialDriveRobot*)'
sub = nh.subscribe("/cmd_vel_mux/input/teleop", 1, &DifferentialDriveRobot::ddr_callback, this);
^
sketch/DifferentialDriveRobot.h:67:96: note: candidate is:
In file included from /home/emiliano/Arduino/libraries/ros_lib/ros.h:38:0,
from sketch/DifferentialDriveRobot.h:8,
from /home/emiliano/catkin_ws/src/my_mobile_robot/from_keyboard_node-local_variables/from_keyboard_node-local_variables.ino:27:
/home/emiliano/Arduino/libraries/ros_lib/ros/node_handle.h:352:12: note: template bool ros::NodeHandle_::subscribe(SubscriberT&) [with SubscriberT = SubscriberT; Hardware = ArduinoHardware; int MAX_SUBSCRIBERS = 25; int MAX_PUBLISHERS = 25; int INPUT_SIZE = 512; int OUTPUT_SIZE = 512]
bool subscribe(SubscriberT& s){
^
/home/emiliano/Arduino/libraries/ros_lib/ros/node_handle.h:352:12: note: template argument deduction/substitution failed:
In file included from /home/emiliano/catkin_ws/src/my_mobile_robot/from_keyboard_node-local_variables/from_keyboard_node-local_variables.ino:27:0:
sketch/DifferentialDriveRobot.h:67:96: note: candidate expects 1 argument, 4 provided
sub = nh.subscribe("/cmd_vel_mux/input/teleop", 1, &DifferentialDriveRobot::ddr_callback, this);
^
exit status 1
invalid use of template-name 'ros::Subscriber' without an argument list
↧
Using Arbotix instead of arduino
I'm making a script that will read a ros message with positions for servo motors controlled by an arbotix-m microcontroller. I have tried running the script using
rosrun rosserial_python serial_node.py /dev/ttyUSB0
but ros keeps producing the following error:
[ERROR] [1548019628.781197]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
Is there a way to set up ros on an arbotix so it can be used like an arduino?
↧