Skip to content

Commit

Permalink
fixes for Robot Operating System connection
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-8 committed Mar 29, 2024
1 parent 267f49d commit f525833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions RCMv2/RCMv2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ void configWifi()
EWD::routerPassword = "password";
EWD::routerPort = 25210;

EWD::mode = EWD::Mode::createAP;
EWD::APName = "rcm0";
EWD::APPassword = "rcmPassword";
EWD::APPort = 25210;
// EWD::mode = EWD::Mode::createAP;
// EWD::APName = "rcm0";
// EWD::APPassword = "rcmPassword";
// EWD::APPort = 25210;
}
#else ////////////// ignore everything below this line unless you're using ROS mode/////////////////////////////////////////////
void ROSWifiSettings()
{
// SSID, password, IP, port (on a computer run: sudo docker run -it --rm --net=host microros/micro-ros-agent:iron udp4 --port 8888 )
set_microros_wifi_transports("router", "password", "10.38.54.221", 8888);
nodeName = "rcm_robot";
// numSubscribers = 10; // max change max number of subscribers
// numSubscribers = 10; //change max number of subscribers
}

#include <example_interfaces/msg/bool.h>
Expand Down
4 changes: 2 additions & 2 deletions RCMv2/rcmros.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void error_loop()
&name##Pub, \
&node, \
rosidl_typesupport_c__get_message_type_support_handle__##type(), \
#topic));
topic));

/**
* @brief macro to create a subscriber
Expand All @@ -62,7 +62,7 @@ void error_loop()
&name##Sub, \
&node, \
rosidl_typesupport_c__get_message_type_support_handle__##type(), \
#topic)); \
topic)); \
RCCHECK(rclc_executor_add_subscription(&executor, &name##Sub, &name##Msg, &name##_subscription_callback, ON_NEW_DATA));

#define RCCHECK(fn) \
Expand Down

0 comments on commit f525833

Please sign in to comment.